Former Liverpool, Real Madrid and Bayern Munich midfielder Xabi Alonso has been appointed manager of Bayer Leverkusen, replacing Gerardo Seoane.
Seoane has been sacked with the club second from bottom in the Bundesliga, having won just one game this season.
Alonso, previously head coach of Real Sociedad's B team, has signed a deal until June 2024.
"I know Leverkusen from my time in Germany as an excellent club," said the 40-year-old.
"Bayer 04 have always had great players, and I see a lot of quality in the current squad too.
"In my discussions with the club, it quickly became clear that, despite the currently difficult situation, ambitious goals are still being pursued in principle. I am very excited about this task and I am sure that we will live up to this claim."
In announcing Swiss manager Seoane's sacking, Leverkusen sporting director Simon Rolfes said a change of coach was "imperative".
On Alonso, he added: "We have signed a coach who, as a player, was an absolute world-class professional for many years, an intelligent strategist and extremely successful in three of the most demanding European leagues."
Alonso, who left Real Sociedad at the end of last season, twice won the Champions League as a player and won the Bundesliga title three times with Bayern.
The Spain international was also crowned European champion in 2008 and 2012, and won the World Cup in 2010.