The judge overseeing the investigation into the Dani Alves sexual assault case has heard evidence from eight witnesses at a closed hearing in Barcelona.

The Brazilian footballer is accused of sexually assaulting a young woman in a Barcelona nightclub on December 30.

The 39-year-old has spent the last two weeks in pre-trial detention at a prison outside Barcelona after being denied bail.

The judicial investigation is now in the hands of judge Concepcion Canton, who will determine if the case should go to trial.

Reporters take pictures of a police van, reportedly carrying Dani Alves, outside the Barcelona courthouse
Reporters take pictures of a police van, reportedly carrying Dani Alves, outside the Barcelona courthouse (Joan Mateu Parra/AP)

The investigation could continue for weeks.

Alves’s defence lawyer, Cristobal Martell, specialises in financial cases and represented the player’s former Barcelona teammate Lionel Messi in his tax fraud case.

Alves has denied wrongdoing.

Initially, he denied ever seeing seen the woman before his arrest.

He later admitted to what he called a consented sexual encounter.

Earlier this week, Alves’s defence filed an appeal to seek his release on bail, offering to turn in his passport and wear a tracking device if he is freed pending the investigation.

The judge had denied Alves bail in part because he was deemed a flight risk.

Alves controls the ball for Brazil against Bolivia in March 2022
Alves controls the ball for Brazil against Bolivia in March 2022 (Juan Karita/AP)

The appeal is being handled by a higher court.

Under Spain’s sexual consent law passed last year, sexual assault takes in a wide array of crimes from online abuse and groping to rape, each with different possible punishments.

A case of violent rape can receive a maximum sentence of 15 years.

Alves won 42 titles, including three Champions Leagues with Barcelona and two Copa Americas with Brazil.

He played in his third World Cup last year in Qatar.

Alves had his contract with Mexican club Pumas terminated after his arrest.

He was detained after returning from Brazil to Spain and agreeing to talk to authorities about the case.