Dani Alves, one of soccer’s most successful and charismatic players, was arrested on Friday after being accused of sexually assaulting a woman in Spain.

The alleged incident took place on December 31 at an exclusive nightclub in downtown Barcelona, police said.

The 39-year-old veteran Brazilian right back, who has played for some of the most prestigious clubs in the world, including Barcelona, Juventus, and Paris Saint-Germain, was taken to a prison near Barcelona in a police van after a judge denied him bail.

Alves had denied any wrongdoing several days before his arrest, and released a video statement on Spanish television channel Antena 3, in which he stated that he was present at the nightclub on the night of the alleged incident but did not know the woman and was always “respectful” of others.

He said, “I was there having a good time with other people.”

“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 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’ arrest and charges have sent shockwaves through the soccer world, as the Brazilian defender is considered one of the most successful players of his generation.

He has won 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.

His current team, Pumas, announced that it has immediately terminated his contract following the news of the charges.

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.