• Guardiola to replace Jupp Heynckes in summer • Had been linked with Chelsea and Manchester City

Bayern Munich have announced that Pep Guardiola will become the club's new coach when Jupp Heynckes' contract expires this summer.

Bayern revealed that Heynckes, 67, will stay on in his post until the end of this season before retiring, at which point the former Barcelona coach will take over on a deal that runs until June 2016.

The news comes 24 hours after Bayern's media director Markus Horwick described claims that the club had approached Guardiola to take over as "complete rubbish", and Guardiola himself said he hoped to manage in the Premier League, with Manchester City and Chelsea among those interested in hiring him.

Bayern, though, revealed that the move had been in the pipeline since at least before Christmas, when Heynckes informed the club he would not be seeking a contract extension.

Karl-Heinz Rummenigge, Bayern's chief executive, said: "We are delighted that we have managed to get Pep Guardiola whom several big clubs wanted and contacted. He is one of the most successful trainers in the world and we are sure that not only Bayern Munich but the whole of German football will benefit from what he brings."

Rummenigge backed Heynckes to oversee a strong end to the season, having guided Bayern to a nine-point lead in the standings ahead of the Bundesliga's resumption following the winter break this weekend.

"As a club and as Jupp Heynckes' friends we have to show understanding for this decision. We have to accept it and we have to respect it," Rummenigge added. "During personal talks with Jupp we assured each other that we will do anything we can, and now even more, to have a successful second half of the season."

Heynckes, in his third spell at Bayern after returning to the club in June 2011, guided the club to the Champions League final in May, where they lost to Chelsea on penalties.

Bayern's chairman Uli Hoeness added: "Only someone of the calibre of Pep Guardiola was an adequate replacement for Jupp Heynckes."

Guardiola, 41, replaced Frank Rijkaard at Barca in 2008 and during his four years at Camp Nou led the club to 13 trophies, making him the most successful coach in the club's history.

"The signing of Guardiola shows the value of Bayern who want to be on par with the likes of Real Madrid or Manchester United," said Bayern's honorary president Franz Beckenbauer.