Soccer superstar Ronaldinho has been released from house arrest in Paraguay in his fake passport case -- which means he'll soon be able to return home to Brazil.

Ronaldinho -- sporting a black COVID mask -- was in court Monday as the judge made his ruling ... ending a saga that's played out on the global stage for the past 6 months.

As we previously reported, the 40-year-old legend was arrested at an upscale hotel in Paraguay back in March ... after officials say he entered the country using a fake passport.

FYI ... Dinho had reportedly had his Brazilian and Spanish passports confiscated in July 2019 over unpaid taxes -- but continued to travel internationally anyway to promote a new book.

Authorities raided the hotel where Ronaldinho and his bro were staying, seized their passports and threw them both in jail -- but Ronaldinho was eventually moved to house arrest.