AC Milan have agreed a deal to sign Lucas Paqueta from Flamengo for €35 million, according to ESPN Brasil.
The Rossoneri have staved off competition from Paris Saint-Germain for the 21-year-old. Both sides offered the same amount but Milan's Brazilian sporting director Leonardo swung the deal in their favour, and Paqueta will join the Serie A side in January, providing he passes a medical.
As well as Milan and PSG, Barcelona had also been tracking the attacking midfielder.
A Flamengo academy product, Paqueta began his senior career in 2016, having starred in the Copa Sao Paulo juniors tournament, and has now made 88 appearances for the club, scoring 17 goals.
He is their leading scorer this campaign with nine, and made his international debut in the friendly against the United States in August before also featuring in the victory over El Salvador four days later.
Milan's stock has fallen significantly since they last won the Champions League in 2007, and have not qualified for Europe's elite competition since 2014.
The club were purchased by hedge fund Elliott Management group in the summer, and they have shown their ambition with the signings of Gonzalo Higuain, Mattia Caldara, Samu Castillejo, Diego Laxalt, Tiemoue Bakayoko and Pepe Reina.
ESPN Brasil's Gabriela Moreira contributed to this report.