​Real Madrid are set to finalise the signing of Eder Militao from Porto after reaching a 'complete agreement' on the transfer of the Brazilian defender.

Militao was also linked with Manchester United, but the European champions moved fast to strike a deal which will see them pay the 21-year-old's release clause of €50m.

According to ​AS, Militao will sign a contract lasting until 2025. 10% of the transfer fee will go to Sao Paulo, the club from whom Porto signed him last summer.

Talks between ​Real Madrid and the player's representatives, who were present at the Bernabeu for the 2-0 win over Sevilla on Saturday, have been ongoing for the past week.

Real Madrid had two reasons to accelerate negotiations. For one, they knew that ​Chelsea and ​Manchester United were both interested in Militao. For two, they knew that his release clause would rise to €75m next summer, so it was important to get the business done in January.

Although the transfer will be completed at the January price, Militao will remain at Porto until the end of the season to help them clinch the league title. They currently lead Benfica by five points at the top.

Eder Militao

The young centre-back is probably seen as a long-term replacement for Sergio Ramos, who will be 33 in March. Militao can learn from the Spaniard before taking over from him when he leaves.

Militao has played every minute of league action for Porto since September, conceding just six goals in 15 matches. He scored his first goal for the club against Aves earlier this month.