Real Madrid will unveil Jose Mourinho as their new coach on Monday after agreeing a compensation deal with Inter.
After days of negotiations, club Presidents Massimo Moratti and Florentino Perez met in Milan earlier today to thrash out a deal to allow Mourinho to quit the European champions.
The 47-year-old will replace Manuel Pellegrini in the Madrid hotseat after the Chilean was sacked on Wednesday.
Italian and Spanish media reported Inter would receive about 8 million euros under the terms of his deal.
The Nerazzurri had claimed they were due around 16 million euros in compensation for Mourinho, whose contract at San Siro was due to run until 2012.
A Real Madrid statement read: "The agreement took place following a meeting between Inter President Massimo Moratti and Real Madrid President Florentino Perez in Milan.
"The meeting was friendly and cordial, as befits the relationship between both clubs."
It added that Mourinho will be presented as Real's new coach at the Estadio Santiago Bernabeu on Monday afternoon.
Mourinho, who took over at San Siro in 2008, became only the third man to win European club football's most prestigious competition with two different clubs when Inter beat Bayern Munich 2-0 in Saturday's UEFA Champions League final.
That success also assured the Nerazzuri's place in the history books as they became the first Italian club to win the Treble, having already retained the Serie A title and beaten Roma to lift the Coppa Italia.
In his first year in charge, the former Porto and Chelsea boss secured the Supercoppa Italiana trophy on top of his first Italian league title.
A club statement said: "President Massimo Moratti and Internazionale thank Jose Mourinho and his coaching staff for the work done during two successful seasons on the domestic and European fronts."
Pellegrini's free-scoring Real side finished runners-up in the Spanish Primera Liga this season, netting 102 goals in 38 games, with 60 of those strikes coming at home.
But the 56-year-old Chilean was dismissed for failing to land any silverware, despite the Spanish giants having signed Cristiano Ronaldo, Ricardo Kaka, Karim Benzema and Xabi Alonso for a combined fee in excess of 200 million euros in the summer of 2009.