The court believe taking the 39-year-old’s passport would not prevent him from leaving Spain “by air or sea or even by land without documentation.”
If he were to return to Brazil, his homeland, the court believe he would not be handed over to Spain as the South American country does not usually extradite its citizens.
The public prosecutor’s office opposed his release.
On January 2, a young woman alleged that Alves had raped her in the bathroom of a nightclub in Barcelona at the end of December.
The player, who initially denied knowing her, changed his story several times but later said they had consensual relations, according to sources close to the case.
Alves is on trial for the alleged crime of sexual assault — which in the Spanish penal code includes rape.
The investigating judge ordered on January 20 that he be remanded in custody without bail, taking into account, among other things, the contradictions in his initial statements and the high risk of absconding.
Alves was sacked by his club Pumas UNAM in Mexico after his arrest.
In a highly successful career, Alves made 408 appearances for Barcelona, with 391 of those coming in his first spell from 2008-2016.
During that initial stint, he won six La Liga titles, three Champions League crowns and four Copa del Rey trophies.
At last year’s World Cup finals in Qatar he became the oldest player to represent Brazil at football’s showpiece tournament.