Follow Whatsapp Channel
He did not address reporters at the entrance of the prison before climbing into a white vehicle.
The conditions for Alves' release include relinquishing both his Brazilian and Spanish passports so he cannot leave Spain as well as an obligation to appear before the court on a weekly basis or whenever summoned.
The public prosecutor has accused Alves of forcing the woman to have sex without her consent and without using a condom.
The 40-year-old defender was arrested in January last year and has been held on remand in the city since then.
If found guilty he could face a jail sentence of four to 15 years.
Alves had previously denied any sexual encounter with the woman who filed a complaint in January about an alleged sexual assault in a restroom at an exclusive Barcelona nightclub.
The 39-year-old, who has denied any wrongdoing, was jailed on remand without bail on January 20 after a local woman filed a complaint last month about an event at the exclusive Sutton nightclub in the city centre.
His Mexican club Pumas UNAM announced they had terminated his contract with immediate effect.
The Brazilian defender denies any wrongdoing.
The tournament will see some of the biggest names of international football players playing their last World Cup.
Results 1-10