Bayern Munich and coach Pep Guardiola will part ways after three seasons at the end of the current campaign and Italian Champions League-winning coach Carlo Ancelotti will replace the Spaniard, club Chief Executive Karl-Heinz Rummenigge said on Sunday.
"We are thankful to Guardiola for all he gave our club and hope to celebrate more success in the current season," Rummenigge said in a statement, adding Ancelotti has signed a three-year deal.
Guardiola's departure was widely expected with several top Premier League clubs reportedly interested in the 44-year-old former Barcelona coach, who had won 14 titles in four years at the Spanish club.
The Spaniard took over after Bayern's 2012-13 treble-winning season and consolidated their domestic dominance with back-to-back league titles and a German Cup in his first two seasons in charge.
But he has yet to lead them to the Champions League title with Bayern losing at the semi-final stage on their previous two attempts.
Bayern are top of the league this season and through to the Champions League knockout stage and can still win the treble.
The 56-year-old Ancelotti is a three-time Champions League winner and has also won a string of domestic titles with AC Milan, Chelsea, Paris St Germain, Juventus and Real Madrid, his most recent appointment.
"I am very honoured that I will be the coach of the big FC Bayern Munich from next season," Ancelotti said.