Real Madrid have named Villarreal’s Chilean coach Manuel Pellegrini as Juande Ramos’ successor at the Bernabeu.
The 55-year-old, who has been in charge at El Madrigal since 2004, had 12 months left on his contract with the Yellow Submarine.
A statement on Real Madrid’s official website read: "Real Madrid and Manuel Pellegrini have reached a deal for the Chilean coach to be the first-team head coach during the forthcoming season."
Former Sevilla and Tottenham coach Ramos was handed a six-month contract by Real when he replaced Bernd Schuster midway through the season but was unable to overhaul Barcelona at the top of the table.
He guided the club to an 18-match unbeaten run but also presided over an embarrassing 6-2 home defeat to the Champions League winners and a 5-0 aggregate defeat to Liverpool in Europe’s premier competition.
New Real president Florentino Perez, who was also reported to be keen to bring Arsene Wenger to the Spanish capital, turned to Pellegrini who has enjoyed a fine record with Villarreal.
He helped the modest club to a third-place finish in his first season in charge and to the semi-finals of the 2005-06 Champions League where they lost narrowly to Arsenal.
In the 2007-08 campaign Villarreal finished second and ended the season just ended in fifth.
Meanwhile, Malaga coach Antonio Tapia has left the club after they finished in a superb eighth place in the Primera Liga.
The 49-year-old had only been in charge at La Rosaleda for one season, but has opted to move on this summer.
He told reporters: "Next season I am not going to be the coach of the team.
"We've had an excellent campaign and it is the ideal moment to end this cycle. Coaches are not always able to decide when we finish a cycle.
"At the moment there is nothing signed, although I hope to study some possibilities and start another project.
"I want to thank all the support I've had from the president, the staff at the club, the fans and the press.
"I've done everything I could and we've had a fantastic season. I'm going away happy."