Jose Mourinho has signed a three-year deal to become Real Madrid’s new head coach.
He will not be officially unveiled until after the club’s presidential election, which is due to take place on 7 June.
However, the 63-year-old’s contract will only be valid if current president Florentino Perez remains in his role.
Perez announced the election during an extraordinary news conference earlier this month in which he criticised journalists and La Liga and spoke of an “organised campaign” against him.
The 79-year-old has been in office since 2009 – and was previously president between 2000 and 2006 – but has overseen two successive trophyless seasons.
Renewables tycoon Enrique Riquelme is standing against Perez in the first presidential election in 20 years featuring a challenger, although Perez is expected to still win.
Mourinho is leaving his role as manager of Benfica, where he took charge in September and led them to third place in the Primeira Liga this season.
In his previous spell in charge of Real between 2010 and 2013, the Portuguese won La Liga, the Copa del Rey and the Spanish Super Cup.
Mourinho will replace Alvaro Arbeloa, who only took charge in January following Xabi Alonso’s departure as boss.