(CNN) -- Xabi Alonso completed his medical at Real Madrid on Wednesday as club director general Jorge Valdano said their close season transfer spending spree was over.
Real say Alonso is their final signing of the close season transfer window.
Liverpool and Real have agreed a fee believed to be in the region of $50 million for the Spanish international, who has also agreed personal terms with the Madrid giants.
It will take Real's spending to an estimated €254 million ($365 million) and Valdano told Radio Cadena Sur that their work was done ahead of the new Spanish Primera Liga season.
'"The main aim was to complete the squad and there will now be no more signings," Valdano said.
Real's incredible transfer market dealings began soon after Florentino Perez was re-elected to the club presidency. Latest transfer gossip and rumors.
Brazilian star Kaka arrived from AC Milan followed quickly by the the prize signing of Cristiano Ronaldo from Manchester United for a world-record fee of $130 million.
Karim Benzema from Lyon was another high-profile acquisition, while Real's other newcomers are Valencia center back Raul Albiol, Liverpool defender Alvaro Arbeloa, Almeria striker Alvaro Negredo and Getafe midfielder Esteban Granero.
Defender Ezequiel Garay is also set to take his place in the squad after being loaned to Racing Santander last season.
Stylish midfielder Alonso is the final piece in the Real jigsaw with attempts to sign Bayern winger Frank Ribery apparently over.
Alonso joined Liverpool from Real Sociedad in August 2004 for $17.5 million and scored 19 goals in 210 games, including a goal in Liverpool's memorable Champions League final victory over Milan in 2005.
Liverpool moved quickly to sign a replacement, announcing later on Wednesday that they had agreed terms with AS Roma for midfielder Alberto Aquilani.
The 25-year-old, who has established himself in the Italian international side, will travel to Merseyside later this week for a medical.
Liverpool manager Rafa Benitez told the official club Web site www.liverpoolfc.tv that Aquilani had a "winning mentality." The fee is reported to be $33 million.
Meanwhile, Valdano confirmed in his radio interview on Wednesday that they would continue to offload unwanted members of the Real squad.
Dutch international trio Klaas-Jan Huntelaar, who has been linked with Tottenham Hotspur, Rafael van der Vaart and Wesley Sneijder are all thought to be for sale to offset some of the massive spending.
The Spanish Primera Liga season starts on August 29 with Real bidding to wrest the title back from Barcelona, who completed a memorable treble last term.