RB Leipzig boss, Julian Nagelsmann, will join Bayern Munich on a five-year contract at the end of this season, the German champions have announced.
Current boss Hansi Flick said last week he wanted to leave the Bavarian club.
“Julian Nagelsmann stands for a new generation of trainers,” said Bayern president Herbert Hainer.
The German, who will take over on 1 July, will reportedly cost Bayern more than £20m in compensation.
“I will leave RB Leipzig with a heavy heart,” said Nagelsmann. “It is something very special for me to take on the position of Bayern coach.”
Nagelsmann became the youngest head coach in Bundesliga history, aged 28, when he took charge of Hoffenheim in February 2016.
After moving to Leipzig in 2019, he led them to a third-place finish in the Bundesliga and the semi-finals of the Champions League in his first season.
This season, the East German club mounted a strong title challenge – looking to become national champions for the first time in their history – before Bayern earned a 1-0 win against them to take control of the race.
Nagelsmann’s side are seven points clear of third-placed Wolfsburg with three matches left to play.
They reached the Champions League last 16, where they lost to Liverpool, and will play Werder Bremen on Friday in the German Cup semi-finals.
“It’s still too early to say goodbye and otherwise talk about memories, because I’m not finished here in Leipzig,” said Nagelsmann.
“My mission will end in the summer, but until then it will continue at full throttle. We have grown into a sworn bunch that finally want a title.
“I have never made a secret of the fact I am excited about the coaching position at Bayern Munich and that I would be happy to take on this job if this unique opportunity should arise.”
Bayern are seven points clear of second-placed RB Leipzig as they close on a ninth consecutive Bundesliga title, but Flick’s side were knocked out of the Champions League by Paris St-Germain earlier this month.
Bayern president Hainer praised Flick’s work and said he wanted to “expressly thank” the outgoing manager.
“He took over our team in a difficult phase in 2019 and then won six titles, the seventh will hopefully follow soon,” said Hainer.
“It will always have a place in the history books of FC Bayern.”