Madrid announced they had signed the 16-year-old on Tuesday, effective in July 2018 when the forward turns 18. FIFA youth transfer regulations do not allow international transfers of players under 18, with few exceptions.

The plan is for Vinicius to remain with Flamengo for another year after until 2019, but he can move to Madrid earlier if both sides agree, the Spanish club said in a statement.

Details were not immediately announced, but reports placed the transfer fee at €45 million. That would make Vinicius the most expensive Brazilian signing since Neymar joined Barcelona in 2013 for €57.1m, a figure that's the subject of an ongoing court case.

Vinicius made his senior professional club debut for Flamengo earlier this month, after already starring for Brazil in March at the 2017 South American Under-17 championship, where he was the top scorer and player of the tournament.

Madrid called Vinicius "a skillful, pacy attacker who is able to go past players and has an eye for goal," and "one of the brighest emerging talents in world football." Flamengo directors said Madrid had been following the player since he was 11 years old.

Barcelona had previously been heavily linked with a move and the club's South American representative Andre Cury had reportedly been involved in preliminary talks with Flamengo and Vinicius' agents at Traffic.

Mundo Deportivo reported last week that Blancos president Florentino Perez had successfully done the deal using experienced agent and Neymar advisor Wagner Ribeiro, and gained "revenge" on Barca by agreeing to pay €45m to Flamengo plus an extra €17m to other various parties involved.