MADRID - Real Madrid has signed FC Porto defender Danilo on a six-year deal worth 31.5 million euros ($33.8 million), starting next season.

Danilo, a 23-year-old Brazilian who previously played for Santos, moved to Porto in January 2012 and helped the Portuguese club win two league championships.

Danilo has played for Brazil 13 times, and also won a silver medal at the 2012 London Olympics.

At Porto, he has 10 goals in 134 appearances, and has helped the team reach the Champions League quarterfinals, where it will meet Bayern Munich.