BARCELONA, Spain (AP) — The judge overseeing the investigation into the Dani Alves sexual assault case took testimony from eight witnesses at a closed hearing in Barcelona on Friday.

The Brazilian soccer player is accused of sexually assaulting a young woman in a Barcelona nightclub on Dec. 30. The 39-year-old Alves has spent the last two weeks in pre-trial detention at a prison outside Barcelona after he was denied bail.

The judicial investigation is now in the hands of judge Concepción Cantón, who will determine if the case should go to trial. The investigation could continue for weeks.

The plaintiff is represented by Ester García, a specialist in sex crimes. Alves’ defense lawyer, Cristóbal Martell, is a specialist in financial cases and represented the player's former Barcelona teammate Lionel Messi in his tax fraud case. Neither spoke to the media after the judge took testimony for more than two hours at Barcelona’s City of Justice complex.

Alves has denied any wrongdoing. At first he denied having ever seen the woman before his arrest. He then later admitted to what he called a consented sexual encounter.

Earlier this week, Alves’ defense filed an appeal to seek his release on bail, offering to turn in his passport and wear a tracking device if he is set free pending the investigation. The judge had denied Alves bail in part because he was deemed a flight risk.

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 soccer 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.