(CNN) -- Bayer Leverkusen coach Jupp Heynckes has confirmed that he will be leaving the German Bundesliga club at the end of the season, paving the way for a return to Bayern Munich.
Heynckes has been among the favorites to succeed Louis van Gaal, following the recent announcement that the Dutchman's contract at Bayern would be terminated in June.
And the 65-year-old now appears set to return to the Bavarian giants for the third time in his career.
Heynckes coached Bayern from 1987 to 1991, guiding the club to two league titles in the process, and was also caretaker coach briefly in 2009 following the departure of Jurgen Klinsmann.
Speaking to Leverkusen's official website, Heynckes said: "Bayer are a well run club who have a great team and it was hard for me to make this decision.
"I will now focus all of my energies into securing second place this season and qualifying for the Champions League directly."
Heynckes later told reporters that he had been offered the Bayern job adding: "I have not said yes and no negotiations have taken place until now, but I have talked with my good friend (Bayern president) Uli Hoeness."
Leverkusen, who are trailing Bundesliga leaders Borussia Dortmund by seven points with seven matches still remaining, have moved quickly to replace Heynckes, announcing the appointment of Freiburg coach Robin Dutt from July 1.
Dutt, 46, has signed a two-year contract with Leverkusen, with an option for an additional year, after leading Freiburg to eighth place in the table.
"I'm very much looking forward to my new challenge in Leverkusen," Dutt told the official website.
"I will work with a team that has been coached outstandingly by Jupp Heynckes and I agree with the football philosophy shared by the club," Dutt added.