Bayern Munich have confirmed that Julian Nagelsmann will become their new head coach next season.

The 33-year-old, who was attracting interest from Tottenham, will leave RB Leipzig at the end of the current campaign and replace Hansi Flick on a five-year deal running until 2026.

Flick announced earlier this month that he wants to terminate his contract early in the summer amid several disagreements with sporting director Hasan Salihamidzic.

The Bundesliga champions said in a statement on their website: "FC Bayern have appointed Julian Nagelsmann as their new head coach.

"The Bavarian-born 33-year-old will move to Munich from RB Leipzig on 1 July 2021 ahead of the new season, signing a five-year-contract with the German record champions until 30 June 2026.

"This comes after FC Bayern agreed to current head coach Hansi Flick's request to have his contract terminated on 30 June 2021, two years earlier than its original expiry date."

Nagelsmann 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, taking them to the Champions League semi-final last year while also challenging Bayern for the Bundesliga crown this term.

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.

"We’re currently enjoying the best Bundesliga campaign in the club’s history too. We want to make sure it ends up our best finish and then also lift a major trophy for the first time as well.

"It’s too early to say my goodbyes and speak about my memories because I’m not done here yet in Leipzig. My mission may end here in the summer, but I will give my absolute all until then. We’ve grown into a real tight-knit bunch that finally wants to win a title."

Nagelsmann was at the top of Spurs’ shortlist to be Jose Mourinho’s replacement but the current European champions have proved too good to turn down.

He has some big shoes to fill at the Allianz Arena, though, as Flick had an incredible 18 months in charge of Bayern, winning a league, cup and Champions League treble last season and again putting Bayern on course for a ninth successive league title.