(CNN) -- Real Madrid have fired Manuel Pellegrini as manager, paving the way for Jose Mourinho to take over.
The Spanish club's president Florentino Perez said Mourinho has agreed personal terms and will be appointed once he has negotiated an to end his contract with Italian champions Inter Milan.
"It's not been an easy decision to reach but we're 100 percent behind the need for a change," Perez told a press conference in Madrid.
"We're very happy that Jose Mourinho will be the man to take over the reins of Real Madrid for the coming years - he's won everything possible.
"We want to have the best person in every position out on the pitch and in the dug-out - we want to sign one of the best managers in the game."
Mourinho has said he wants to join Madrid after leading Inter to a treble of Champions League, Italian league and cup last season.
Inter president Massimo Moratti said Tuesday that he was resigned to losing the Portuguese coach to the nine-time European champions.
Pellegrini, 56, paid the price for failing to win a trophy in his only season in Madrid.
Real finished on 96 points, three behind champions Barcelona, and went out of the Champions league in the last 16.
Mourinho previously won the Champions League with Porto in his native Portugal and two English Premier League titles at Chelsea.
In Madrid, he will seek to become the first manager to win the European Cup with three different clubs.