Sami Khedira will join Juventus on a free transfer from Real Madrid on 1 July, the Italian club have announced.
The Germany midfielder, 28, has agreed a four-year contract with the Italian double winners and Champions League finalists.
Khedira joined Real from his hometown club Stuttgart in 2010 and has won the league, the Copa del Rey and the Champions League while in Spain.
But he played only 17 times this season after a series of injuries.
Manchester United, Chelsea and Arsenal had all been linked with Khedira, who has made 54 appearances for Germany and was part of their 2014 World Cup-winning squad.