SAO PAULO (AP) -- Ronaldinho is joining popular Brazilian club Flamengo until the 2014 World Cup.

Flamengo's website announced the deal on Monday after details on the player's transfer from AC Milan were finalized in Rio de Janeiro.

The agreement ends several days of negotiations and seals Ronaldinho's return to his native country after 10 years in European soccer, where he thrived with Paris Saint-Germain and Barcelona.

Flamengo was able to sign the 30-year-old Ronaldinho after Brazilian clubs Gremio and Palmeiras ended their efforts to acquire the two-time FIFA player of the year over the weekend.

Financial details of Ronaldinho's contract with Flamengo were not immediately released.

SI Apps
We've Got Apps Too
Get expert analysis, unrivaled access, and the award-winning storytelling only SI can provide - from Peter King, Tom Verducci, Lee Jenkins, Seth Davis, and more - delivered straight to you, along with up-to-the-minute news and live scores.