Los Merengues have long been chasing the Spanish international, but the deal nearly collapsed after Liverpool asked Real to pay £30 million for Alonso's services.
Alonso himself publicly announced that he would love to join Real before coach Manuel Pellegrini put pressure on the Spanish club president Florentino Perez to conclude the purchase.
"Liverpool Football Club this evening confirmed they had reached agreement for the sale of Xabi Alonso to Real Madrid, subject only to a medical," read a statement on the Red's website.
The statement added that the terms of the deal will remain confidential and undisclosed. However, Spanish reports claimed that the deal could be done for around £25 million.
The 27-year-old will be Real's sixth major purchase of the summer, after they brought in Kaka, Cristiano Ronaldo, Karim Benzema, Raul Albiol and Alvaro Arbeloa.
Alonso moved to Liverpool from Real Sociedad in 2004. He helped the club win the UEFA Champions League in his first season with the club.
نرشح لكم
كونتي: السوبر الإيطالي بنظامه الجديد أصبح أكثر أهمية
تقرير: ميلان وإنتر يستهدفان 180 مليون يورو سنويا من ملعبهما الجديد
بعد انضمامه لقائمة أمم إفريقيا.. ليكيب: ليون يقترب من ضم لاعب منتخب الجزائر
باريخو عن الطرد: الحكم يخطئ ويصيب.. وكل شيء يسير ضدنا
دي يونج يحذر: هذا ليس وقت توزيع الكؤوس
ذا أثليتك: إيزاك سيغيب لعدة أشهر على الأرجح.. ومخاوف في ليفربول من كسر الساق
"سأتحدث مع ديكو".. فليك يكشف إمكانية التعاقد مع بديل لـ كريستينسن
أوناي إيمري: جمهور أستون فيلا فخور بما نفعله











