Photo credit: AFP

Pep Guardiola will leave Bayern Munich as head coach at the end of the season and be replaced by Carlo Ancelotti, club chairman Karl-Heinz Rummenigge confirmed on Sunday.

“We appreciate everything Guardiola gave to our club and hope to celebrate a lot of success this season, especially as we know now he is leaving,” Rummenigge said in a club statement.

“Carlo Ancelotti has had a lot of success as coach and has won the Champions League three times.

“He is a calm, balanced professional who can deal with stars and lets you play a flexible style of football — we have found what we were looking for.

“With Ancelotti, we have a new, successful trainer for Bayern. We are looking forward to working together.”

The 56-year-old Ancelotti will bring a wealth of experience to Bayern having won the Champions League twice with AC Milan in 2003 and 2007, then with Real Madrid in 2014.

“It’s a great honor for me that I will be trainer of such a great club as FC Bayern next season,” said Ancelotti, who has signed a three-year contract until 2019, in a club statement.

Having joined Bayern in 2013 to much fanfare, Guardiola has so far won five titles with the Bavarian giants, giving him a career total of 19 as coach following his 14 titles in four years from 2008-2012 at Barcelona.

Guardiola flew home to Spain on Sunday and has given no indication of his future plans, but has been heavily linked to Manchester City.

A Thomas Mueller penalty on Saturday sealed Bayern’s 1-0 win at Hanover 96 which left the German league leaders eight points clear in the table and on course to become the first club to win a fourth straight Bundesliga.

Guardiola’s side are currently on course to repeat their 2013 treble of Champions League, Bundesliga and German Cup and will face last season’s finalists Juventus in the last 16 of Europe’s premier club competition.

Guardiola’s tenure at Bayern is likely to be judged on his Champions League form as he bids to reach the final in Milan on May 28 having exited at the semi-final stage the last two seasons.

Having won the Champions League in 2009 and 2011 with Barcelona he has so far failed to bring Europe’s top domestic prize back to Munich.