Jupp Heynckes has been appointed Bayern Munich boss until the end of the season.
Heynckes recently revealed that he was analysing an offer from Bayern to become head coach of the German giants for the fourth time in his career.
The 72-year-old has now decided to accept the position, with the experienced manager taking control of the Bundesliga champions on a contract until the end of the 2017-18 campaign.
Bayern chairman Karl-Heinz Rummenigge said in a statement: "There is a great deal of trust between Jupp Heynckes and Bayern. He is the ideal coach for Bayern at the moment."
Carlo Ancelotti was removed from his position as head coach of Bayern last week following a disappointing start to the season.
Heynckes first managed Bayern between 1987 and 1991, before a short spell as caretaker manager in 2009.
The German then returned to the Allianz Arena for the third time in 2011, and helped the club win a Champions League and Bundesliga double during the 2012-13 season before standing down as head coach.
Bayern are currently five points behind Bundesliga leaders Borussia Dortmund after seven games of the new campaign.