Real Madrid have reached an agreement with Porto to sign their Brazil right-back Danilo for a fee of £23 million.

The 23-year-old Brazil international, who has agreed upon a six-year contract until 30 June 2021, will join the La Liga club next season.

Danilo started his career at the Brazilian club America before joining Santos and then moving to Porto in January 2012, where he has won two Portuguese league titles.

He told uefa.com that he modelled himself on Brazil’s legendary attacking full-back Cafu. “From my generation and in my position the player I watched a lot was Cafu, because he’s a player who won a lot with Brazil. He was the captain of the national team for a long time, and he also made history outside of Brazil,” he said.

He will compete for a starting place at Madrid with Daniel Carvajal and the former Liverpool defender Alvaro Arbeloa.