Getty

Soccer Star Dani Alves Claims He Had Consensual Sex ... w/ Sexual Assault Accuser

Brazilian soccer star Dani Alves -- who's been detained in Spain since January when a woman accused him of sexually assaulting her in a club -- testified Monday he didn't assault anyone, but rather had consensual sex with the alleged victim.

According to the Associated Press, Alves testified there was a mutual attraction between him and the woman he's accused of sexually assaulting at a Barcelona nightclub on Dec. 30.

Alves initially denied any wrongdoing when the allegation was first made ... saying he didn't have sex with the woman, apparently fearing the admission would jeopardize his marriage.

"I would like to deny everything first," Alves said at the time. "I was there, in that location, with more people, having a good time. Everybody knows that I love to dance. Having a good time, but without invading the space of others."

"I'm very sorry, but I don't know who that young lady is. I don't know who she is. I've never seen her in my life," he said at the time.

But, Alves has since changed his story ... and now claims he did have sex, but it was consensual.

During a pretrial hearing, a judge denied his request to be released on bail, believing Alves to be a flight risk.

39-year-old Alves -- who won 43 titles in his career -- still does not have a trial date set ... and unless something changes, will cool his heels in jail while he awaits his trial.

Click here for info about our online advertising practices.