Militao, who joined Porto last year from Sao Paulo, made his Brazil debut last September in a 5-0 friendly win over El Salvador.
He will add competition to a Madrid defence that continues to depend on an ageing Sergio Ramos, who was suspended as they crashed out of the Champions League with a 4-1 home defeat to Ajax Amsterdam earlier this month.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
(Reporting by Anita Kobylinska; Editing by Toby Davis)
