Ronaldinho has been released from a high-security jail in Paraguay and placed under house arrest while he is investigated over a fake passport.
The 2005 Ballon d’Or winner had spent time in jail along with his brother after being arrested on 6 March, accused of using fake passports.
The pair had previously been denied bail but posted $800,000 (£648,000) each and must now stay in a four-star hotel in Asuncion while awaiting trial.
Both Ronaldinho, 40, and his brother Roberto Assis deny any wrongdoing.
Their lawyer has called their imprisonment “arbitrary, abusive and illegal.”
In allowing the pair to leave prison, Judge Gustavo Amarilla said the size of the bail paid was “significant” and would “guarantee they will not flee”.
Ronaldinho had initially visited Paraguay to promote a book and a campaign for underprivileged children.
The 2002 World Cup winner played for clubs including Paris St-Germain, Barcelona and AC Milan before retiring in 2015 after a spell at Brazilian side Fluminense.
Ronaldhinho won the World Cup with Brazil in 2002 and was named Fifpro World Player in 2005 and 2006.