BARCELONA, Spain (AP) — Dani Alves, one of soccer’s most successful and charismatic players, was arrested Friday after being accused of sexually assaulting a woman in Spain. The veteran Brazilian right back was taken to a prison near Barcelona in a police van after a judge denied him bail.

The alleged assault took place on Dec. 31 at an exclusive nightclub in downtown Barcelona, police told The Associated Press.

Alves had denied any wrongdoing several days before his arrest.

The former Barcelona star was taken into custody after he answered a police summons while in Spain. He was then escorted in a police car to the courthouse. State prosecutors had asked for him to be held without bail, and a judge agreed after charging him with sexual assault following several hours of testimony from him, the alleged victim and a witness, the court said. Unless that decision is reversed on appeal, Alves will remain in custody until trial at a still unspecified date.

Alves signed for Pumas in July and the Mexican club announced Friday it was immediately terminating his contact. Pumas president Leopoldo Silva said that his club could not keep Alves on its squad.

“This is an institution that promotes respect and the correct, dignified and professional behavior of its male and female players both on and off the field because they are role models in Mexico and throughout the world,” Silva said. “We cannot permit any conduct that would damage our philosophy.”

A charge of sexual assault in Spain can mean anything from unsolicited and unwanted sexual groping to rape. Police and the court’s press office said they could not give any details on the case. Rape can be subject to prison terms of up to 15 years under a new law passed last year.

Alves denied the allegations last week in a video he sent to Spanish television channel Antena 3. While acknowledging he had gone dancing at the club on the night of the alleged assault, he said he did not know the woman and was always “respectful” of others.

“I was there having a good time with other people,” Alves said. “Everyone who knows me knows that I like dancing. I was having a good time, but I never invaded the personal space of anyone. I always am respectful.”

The 39-year-old Alves is one of soccer’s most successful players, winning major titles with several elite clubs, including Barcelona, Juventus and Paris Saint-Germain, over his long career. He also helped Brazil win two Copa America trophies — in 2007 and 2019 — and an Olympic gold medal at age 38.

Known for his creative play on the field, and a sharp wit and love of fashion off it, the right back has been one of soccer’s leading personalities for more than a decade.

The defender was a key part of Barcelona’s golden years playing between 2008-16 on the team’s right flank behind Lionel Messi. He won the Champions League three times with the Catalan club, which he briefly rejoined last season. He played at his third World Cup, the only major title he’s not won, in December.

___

More AP soccer: https://apnews.com/hub/soccer and https://twitter.com/AP_Sports