The Germany international's previous deal with the La Liga champions had been due to expire at the end of the 2024-25 campaign, but it has now been announced that he has committed his long-term future to the club.
"FC Barcelona and the player Marc ter Stegen have reached an agreement to extend his contract until 30 June 2028. The buy out clause is set at 500m euros," read a statement on the club's official website.
"The event for the contract extension took place on Friday in the Spotify Camp Nou offices with president Joan Laporta, first vice president Rafa Yuste, economic vice president Eduard Romeu, board member Joan Soler and sporting director Anderson Luis de Souza 'Deco'."
Ter Stegen made the move to Barcelona from Borussia Monchengladbach in 2014, and he has represented the Catalan giants on 379 appearances in all competitions.
The 31-year-old was in excellent form for the Catalan side during the 2022-23 campaign, making 50 appearances in all competitions, keeping 28 clean sheets in the process.
Ter Stegen played a vital role in Barcelona's league success last term, meanwhile, only conceding 18 goals in 38 appearances in Spain's top flight.
The German has also captained the team in their first two La Liga games this season, keeping a clean sheet in both affairs against Getafe and Cadiz.
Ter Stegen is again set to captain Barcelona against Villarreal on Sunday, but the champions will be missing Pedri and Ronald Araujo through injury, in addition to Raphinha through suspension.
Speaking during his press conference on Friday, Villarreal head coach Quique Setien said that the Barcelona absences could help his side pick up a positive result.
"They have a great squad, but it is true that they have important casualties. This is the case with Raphinha, who played a great game here last year. But we know that they have high-quality players on the bench who can replace them without problems," Setien told reporters.
"In the case of Pedri, he does seem to me to be a differential player. I'm not happy that he got injured, but it's a relief. We already saw him here last year, and we are aware of his ability to read football near the penalty area. He is an extraordinary player, so it is a relief that he is not playing."
Barcelona could also again be missing new signing Inigo Martinez this weekend, although the Spaniard is closing in on a return, having seemingly overcome a troublesome foot problem.