Madrid, Spain (SportsNetwork.com) - Real Madrid has confirmed that the club has completed the signing of FC Porto defender Danilo, who joins the Spanish giants on a six-year contract.

Madrid confirmed the move in a club statement, while Porto said in separate statement that the deal is worth $34 million.

The Brazil international moved to Porto from Santos in 2012 and helped the club capture two league titles and reach the quarterfinals of the Champions League this season, where Porto will face Bayern Munich.

Danilo, 23, has earned 13 caps for Brazil while earning a silver medal at the 2012 Olympics.