Brazil national team defender Dani Alves is in hot water as he faces an investigation over an alleged sexual assault. He is currently in police custody in Spain and tried to get bail but was denied by a court.

The former FC Barcelona legend's legal team appealed on January 30, asking that their client be released from pre-trial detention after he was jailed on remand last January 20. However, the judge on the case ruled on Tuesday that Alves is a potential flight risk, given that he has the financial means to escape and fly back home to Brazil.

According to ESPN, Brazil and Spain currently do not have extradition agreements, which means that once Alves gets back home, Spain cannot extradite him and face trial.

The court said, "Nothing would stop Mr. Alves from leaving Spain by air, sea or even land without documentation and reaching his country of origin, where he could stay knowing that he would not be delivered to Spain despite international arrest warrants or extradition orders."

Alves has agreed to hand over his passport. He must also report to the court and authorities as often as required and not go within 500 meters (yards) of the accuser or her home or workplace.

READ NEXT: Brazil Soccer Star Vinicius Junior Targeted by Racist Fans in Spain

Brazil Soccer Star Dani Alves Accused of Sexually Assaulting a Woman in a Nightclub in Spain

Dani Alves made a name for himself playing for FC Barcelona, one of the biggest soccer clubs in the world. Even though he is now playing for Liga MX team Pumas UNAM in Mexico, he is still often seen around Barcelona in Spain, where he used to play.

According to The Sun, he allegedly assaulted a 23-year-old woman in a nightclub in Barcelona on December 30. The woman identified Alves as her attacker, but the Brazilian soccer star said he did not even make contact with her. But in a court hearing, he changed his story, denying wrongdoing and saying sex with the accuser was consensual.

Alves was part of Brazil's failed World Cup run in Qatar last year, though he had been a very successful defender in his European club career, winning six La Liga titles and three Champions Leagues between 2008 and 2016.

He also played for French powerhouse Paris St. Germaine and Italian giant Juventus. Spanish media released CCTV footage that showed Alves with the alleged victim in a VIP area. After the attack, the victim said she was too scared to leave the toilet for several minutes.

Brazil Soccer Star Dani Alves Gets VIP Treatment in Spanish Jail

While he tried to get out of jail, Spanish media reported that the Brazilian soccer star seemed to be getting VIP treatment behind bars. According to The Sun, while staying behind bars, Dani Alves always has lunch in a private room and is allowed daily visits.

An inmate's relative said the Brazilian soccer star is doing well inside and even has a few new friends. Alves also received visits from his wife, who has vowed to stay with him despite being accused of sexually assaulting another woman.

READ MORE: Brazil: Where Soccer is Treated Like a Religion

This article is owned by Latin Post.

Written by: Rick Martin

WATCH: What Really Happened to Dani Alves? - From Inside Football