Dani Alves is in custody on a sexual assault charge ©Getty Images

Brazilian defender Dani Alves has been detained while an investigation concludes into an alleged sexual assault by him in a Barcelona nightclub.

The 39-year-old is accused of touching a woman beneath her underwear without her consent when clubbing in December.

When the investigation was announced, Alves said he "vehemently denies" the allegations.

Alves' contract with Liga MX club Pumas UNAM in Mexico has been terminated with immediate effect as a result.

"The club reiterates its commitment to not tolerate acts by any member, whoever they may be, that go against the club's spirit and its values," said Pumas UNAM sporting President Leopoldo Silva.

"We cannot allow the conduct of one person to damage our work philosophy, which has been an example throughout history."

Dani Alves being taken into custody by police ©Getty Images
Dani Alves being taken into custody by police ©Getty Images

The right-back was taken into custody and questioned by a judge on Friday in Barcelona, as confirmed by police to Reuters and AFP.

He has no option for bail.

Alves is best-known for his time playing for Spanish club Barcelona, playing 408 times for them.

The veteran has also had spells in Europe with Sevilla, Juventus and Paris Saint-Germain and is regarded as one of Brazil's greatest defenders, having won 126 caps for his country.

Only Cafu has played more times for the men's national team.

Alves has also won the most professional trophies in football history, with 42 - a record he now shares with Argentina's Lionel Messi.