Germany coach Joachim Low will step down after this year's European Championship, bringing forward his previous plan to quit after the next FIFA World Cup.
The German football federation said on Tuesday that Low asked to terminate his contract, which was to run through the 2022 World Cup, after this year's Euro's tournament.
Low is the longest-serving coach of a national team and has been in charge for 189 games. He took over after the 2006 World Cup and had been assistant coach to Jurgen Klinsmann for two years before that.
"I'm taking this step very consciously, full of pride and with gratitude, but still with the same motivation for the upcoming European Championship," Low said.
"Pride, because it is something very special for me and an honour to be engaged for my country. And because I have been able to work with the best players in the country for almost 17 years."
Low led Germany to the 2014 World Cup title, their fourth overall, but he has been under pressure since a first-round exit at the last World Cup and subsequent lacklustre performances.
Low wanted a shake-up of the team after the disappointing World Cup in Russia, and he axed the experienced trio Thomas Muller, Jerome Boateng and Mats Hummels to make room for younger players. But they haven't been able to make the step up.
Germany produced one disjointed performance after another last year with laboured wins over Ukraine and the Czech Republic.
They conceded late equalisers against Spain, Switzerland and Turkey before the team's last game ended in a 6-0 loss to the Spanish in the Nations League in November. That was Germany's biggest losing margin since a 6-0 result against Austria in a friendly in Berlin in 1931.
"I have had great triumphs and painful defeats, but above all many wonderful and magic moments - not only the 2014 World Cup win in Brazil," Low said.
"I will remain thankful to the federation for always providing myself and the team an optimal working environment."
Federation president Fritz Keller said Low's decision to quit after the European Championship is "highly respectable" because it gives the governing body "the necessary time to name his successor calmly and with a sense of proportion."
Keller thanked the 61-year-old Low for his service.
"The federation knows what it has in Jogi. He is one of the biggest coaches in world soccer," Keller said.
"Jogi Low has shaped German soccer like none other for years and helped it to the highest levels internationally."
Low said he would do all he can at the European Championship, which was postponed last year because of the coronavirus pandemic.
Germany have been drawn in a group with World Cup champions France, European champions Portugal and Hungary.
"I'll give my best to make our fans happy and to be successful at this tournament," he said.