MUNICH — Pep Guardiola has spurned Bayern Munich's attempts to retain him as coach into next season, with the German soccer powerhouse simultaneously announcing Sunday that Carlo Ancelotti will take over in the dugout.
It confirms Guardiola's availability to other teams from the end of the season, having been strongly linked for months with the Manchester City job currently occupied by Manuel Pellegrini. But the 44-year-old Spaniard took a year's sabbatical of soccer between leaving Barcelona and joining Bayern in 2013.
Ancelotti, who has signed a three-year contract, arrives as a three-time winner of the Champions League — the one major honor to so far elude Guardiola at Bayern. Guardiola won Europe's premier competition twice with Barcelona as he established himself as the most talented young coach in world soccer between 2008 and 2012.
Now Bayern is reluctantly preparing to bid farewell to Guardiola after the three seasons.
"We are very thankful to Pep Guardiola for everything he has given our club since 2013," Bayern chairman Karl-Heinz Rummenigge said. "I am sure that Pep and our team will work even harder to achieve great sporting goals now that it's certain that Pep will leave Bayern."
The smooth succession plan emulates the handover from Jupp Heynckes to Guardiola at the end of the 2012-13 season which saw a treble completed by winning a fifth European title.
While Guardiola arrived at Bayern having only managed Barcelona — with spectacular results as he won 14 titles over four seasons — Ancelotti has coached Real Madrid, Paris Saint-Germain, Chelsea and AC Milan.
Ancelotti delivered Madrid's coveted 10th Champions League title in 2014 — beating Guardiola's Bayern en route to the final — but the following season produced no trophies and he left in May.
The 56-year-old Ancelotti was former Bayern great Franz Beckenbauer's preferred candidate if Guardiola chose not to extend his contract.
"When I knew of the club's interest I didn't want to consider any other offer. I honestly wish Bayern Munich and my friend Pep Guardiola the best for the current season," Ancelotti said.
"It's an honor for me to be a part of this great club next season," he added.
Rummenigge described Ancelotti as "a calm, balanced expert, who can deal with stars and can play a flexible game."
"What we sought, we found," Rummenigge said.
Guardiola, who took over Heynckes' treble-winning side in 2013, led Bayern to the Club World Cup and UEFA Super Cup that same year, a German league and cup double in 2014, and another Bundesliga title in 2015.
While preaching a possession-based game, patient build up and a mean defense, Guardiola has altered Bayern's style this season to be more ruthless in attack. Only Borussia Dortmund had scored more goals after 17 league games.
Guardiola, an intelligent midfielder for Johan Cruyff's Barcelona in his playing days, is a meticulous coach who plans in minute detail. He has moved players from their preferred position to see them excel elsewhere. Phillip Lahm, a defender, surprised many with his fine performances in midfield.
But Guardiola has reportedly been unhappy that he did not have the final word on player transfers.
And recurrent injury problems have led to issues between Guardiola and Bayern's medical staff. Kicker magazine reported Thursday that the coach blamed team doctor Volker Braun for the latest injury to afflict Franck Ribery. The French winger, who recently returned from nine months out with an ankle injury, was ruled out for another eight weeks with a muscle tear sustained in the Champions League win at Dinamo Zagreb.
Braun reportedly denied responsibility for Ribery's injury and instead blamed Guardiola for rushing players back. Arjen Robben, David Alaba, Mario Goetze, Douglas Costa, Mehdi Benatia, Juan Bernat and Lahm were all out injured.
Guardiola fell out in similar circumstances last April with Braun's predecessor, Hans-Wilhelm Mueller-Wohlfahrt, who quit after 38 years at the club.
Now it is Guardiola preparing for leaving Bayern — ideally as a treble winner in his final season.
Chasing an unprecedented fourth successive Bundesliga title, Bayern has an eight-point lead at the halfway point.
Bayern faces 2015 runner-up Juventus in the round of 16 in the Champions League — a competition that has only brought disappointment in Munich for Guardiola, with comprehensive semifinal defeats to Real Madrid and Barcelona.
Bayern has an easier route to the German Cup final, with second-division Bochum awaiting in the semifinals.
AP Sports Writer Nesha Starcevic in Frankfurt, Germany and Associated Press Writer Ciaran Fahey in Berlin contributed to this report.