Dani Alves played for La Liga club FC Barcelona during two spells with the team.
CNN  — 

Brazilian soccer star Dani Alves, under investigation on a sexual assault charge, was remanded to jail on Friday by a Spanish judge, the Catalonia Higher Court of Justice press office said in a statement.

“Investigating magistrate number 15 of Barcelona has received today, as a detainee, the football player Dani Alves, accused by a woman for an alleged sexual assault, in events that allegedly happened in a Barcelona discotheque this past month of December,” the statement said.

“The magistrate has ruled provisional jail without bail, for the ongoing case for a crime of sexual assault,” the statement said. But the judge allowed that Alves could have communications while in jail, it added.

The woman who made the complaint against Alves testified Friday before the magistrate, as did a witness, according to the court’s press office. These were separate, closed-door appearances before the judge and were also separate from Alves’ arraignment.

The woman’s attorney has presented a private prosecution against Alves, permitted under Spanish law, that is in addition to the state prosecutor’s case, the court press office said. Hearing the separate testimony on Friday of the woman and Alves were her attorney, Alves’ defense attorney, the state prosecutor and the magistrate, the press office added.

But the content of the woman’s testimony was not made public by the magistrate, according to the court’s press office.

The same investigating magistrate announced last week that an investigation was underway against Alves, due to the allegations, the press office said at the time.

Alves, 39, was detained earlier Friday by the Catalan regional police, the police press office told CNN. He spoke to officers at a police station in Barcelona and then was driven in a police car to the courthouse across town, the police press office said.

He remained in police custody, and hours later, he was arraigned before the magistrate.

Alves, in a recorded video of himself that he sent to a Spanish reporter which aired on a Spanish TV program, “Y Ahora Sonsoles,” two weeks ago, said he denied the accusations against him. Reuters has also reported that Alves denies any wrongdoing.

Alves is one of the most decorated football players of his generation, having won domestic titles in Spain, Italy and France. He also won three Champions League titles with Barcelona.

Alves’ contract terminated

Mexican team Club Universidad Nacional (UNAM) announced the immediate termination of Alves’ contract on Friday.

“The Club Universidad Nacional has taken the decision to terminate with just cause the employment contract of the player Daniel Alves as of this day,” club president Leopoldo Silva announced in a press conference.

“With this decision, the club reiterates its commitment to not tolerate acts of any member of our institution, whoever he may be, that attempt against the university’s spirit and its values,” Silva said.

“We cannot allow the conduct of one person to damage our work philosophy, which has been an example throughout history in the training and development of young sportsmen and women in our country,” Silva concluded.

CNN’s Matt Foster contributed reporting.