Ronaldinho reached an agreement with AC Milan on Thursday to end his contract, clearing the way to return to Brazil soccer.

Three Brazilian clubs remain in contention to sign the 2004 and 2005 FIFA player of the year: Palmeiras, Flamengo and his former team, Gremio.

"We reached an agreement with Milan and now I'm free to continue my life here in Brazil," Ronaldinho said.

The 30-year-old Ronaldinho wants to play in the 2014 World Cup in Brazil and hopes that a successful return to Brazilian soccer will help him reach that goal. After leaving Barcelona to join AC Milan in 2008, Ronaldinho struggled to establish himself at the Italian club.

Ronaldinho has been playing in Europe since he joined France's Paris-Saint Germain in 2001, where he stayed for two years before making the move to Barcelona.