Real Madrid have agreed to sign defender Eder Militao from Porto at the end of the season for his buy-out clause of 50m euros (£42.7m).
Both clubs announced the move on Thursday and the Spanish club say the 21-year-old Brazil international will sign a contract until 2025 with them.
The centre-back is Real Madrid's first signing following the return of Zinedine Zidane as manager.