Austria international David Alaba has signed for Real Madrid, the La Liga side said on Friday, joining as a free agent after spending more than a decade with Bayern Munich.
The versatile 28-year-old defender has agreed a five-year contract and will be presented after the European Championship which runs until July 11, Real said in a statement.
Alaba is the club's first signing for the next campaign after a disappointing season in which they lost out on the Liga title to neighbours Atletico Madrid and were beaten in the Champions League semi-finals by Chelsea.
Zinedine Zidane resigned as Real coach on Thursday after the club's first trophyless campaign in 11 years.
Alaba made 431 appearances for Bayern in all competitions, scoring 33 goals and providing 55 assists while amassing a sizeable trophy collection including 10 Bundesliga titles, six German Cups plus two Champions League crowns.
Primarily a centre-back, Alaba could be Real's most influential defender for the next few years as captain Sergio Ramos is about to end his contract with the club and media reports say Raphael Varane could also depart.
The Austrian can also provide cover for left back Ferland Mendy or be used in central midfield should Real's next coach wish to relieve the strain on Casemiro, who has got used to playing practically every game in the last few seasons.
Alaba, who joined Bayern's youth set-up in 2008 and made his Bundesliga debut in 2010, revealed he was leaving the club back in February, saying he "had decided to do something new".
Bayern withdrew a contract offer for Alaba in November after talks dragged on for months over the player's annual salary.