Real Madrid have signed Porto full-back Danilo for €31.5 million.
The Brazilian has long been linked with a move to the Santiago Bernabeu and both clubs have now confirmed the deal.
The 23-year-old former Santos man has penned a six-year deal that runs until June 30, 2021 and he will join up with Carlo Ancelotti's squad next season and finish this term with the Portuguese side.
Madrid beat off strong competition, including Barcelona and Manchester United, for the Brazil international. The Portuguese club announced the fee as being €31.5 million.
Danilo, who was out of contract with Porto in the summer of 2016, will arrive in Madrid to offer competition for full-back Dani Carvajal, who has been Ancelotti's first choice this season. Alvaro Arbeloa is expected to move on to pastures new this summer.