Former Brazil footballer Dani Alves has been granted release on bail for €1 million ($1.1m) upon appeal, a court in Barcelona, Spain, announced on Wednesday.

Alves, 40, was convicted of sexual assault last month and sentenced to 4½ years in prison, of which he had already served over a year.

His lawyer, Inés Guardiola, fought the ruling and, following a hearing on Tuesday, Alves has been released pending a final resolution in the appeal.

Alves’ release is also dependent on handing in his Spanish and Brazilian passports, remaining in Spain and agreeing to weekly court check-ins.

He also must adhere to a restraining order that prevents him from going within 1,000 metres of his victim, her home, her place of work or any other place she is known to frequent.

All parties involved — the defence, the victim’s legal team and the prosecution — have three days to appeal Wednesday’s ruling.

Ester García, the victim’s lawyer, expressed her disappointment with the ruling to Spanish outlet RAC1 after leaving the court.

“I am really dissatisfied with this decision,” she said. “We will file an appeal because we believe it is not in accordance with the law.

“Justice is being done for the rich. It is scandalous that they free someone because they can get €1 million in no time.”