Bayern Munich have signed RB Leipzig coach Julian Nagelsmann to take over from Hansi Flick next season on a five-year contract.
The 33-year-old Nagelsmann took the reins at second-placed RB Leipzig in 2019 and led them to the Champions League semi-finals last year.
Flick is leaving Bayern at the end of the season of his own free will despite having a contract until 2023.
Nagelsmann was long seen as a Bayern target.
"Julian Nagelsmann represents a new generation of coaching," said Bayern president Herbert Hainer. "Despite his young age he has already had an impressive track record.
"We are convinced that with Julian Nagelsmann we will continue the success of the past years."
Under Nagelsmann, Leipzig still have an outside shot at the title, seven points behind Bayern with three games remaining this season.
He has earned the nickname 'Baby Mourinho' after developing into arguably the standout young coach in Europe.
After beginning his managerial career aged just 28 at Hoffenheim, he turned Leipzig into a force in both Germany and the continent.
He said on the club's website: "I will leave RB Leipzig with a heavy heart. I've been able to coach a special team here at a club with huge opportunities and the best possible conditions to work in.
"Everybody here, including the staff who work alongside the team, have ensured that we've written plenty of stories for the club's history books and are continuing to do so now. I'm really proud of that.
"Our run to the Champions League semi-finals was definitely the highlight of our time together. It was a moment that I'll never forget."
He will, however, have great expectations placed on him after Flick won every title available in the 2019-20 season with a six-trophy run.
Flick may well also leave with yet another Bundesliga crown, extending Bayern's league run to nine consecutive titles.
"For me the past two years have been unforgettable," Flick said in a club statement. "It was an outstanding time."
"You only have success together. A coach is nothing without a team and I was lucky to have fantastic players here in Munich."
Flick is the strongest candidate to succeed Germany coach Joachim Loew after the Euro championships in June.