Spanish prosecutors will appeal against the four-and-a-half year sentence handed to former Brazil international footballer Dani Alves for rape and seek a longer jail term, judicial sources said Friday. 

Alves was sentenced on February 22 after being convicted of raping a young woman at a Barcelona nightclub in December 2022. 

The 40-year-old footballer was also handed five years' probation after serving his jail sentence and ordered to pay the victim 150,000 euros ($162,000) in compensation.

Prosecutors had called for him to be jailed for nine years followed by 10 years of probation.

One of the world's most decorated footballers, who played for Barcelona and Paris Saint-Germain, Alves insisted the sex was consensual. 

Immediately after the sentence, his lawyers said they would appeal. 

The victim, who testified behind a screen to protect her identity, said Alves had violently forced her to have sex in a private bathroom of the nightclub despite her begging him to release her, causing her "anguish and terror", prosecutors said.

Police officers who later came to the nightclub told the court about the woman's state of agitation and "shock" as well as her anxiety that "nobody would believe her" if she filed a complaint.

In sentencing him, the Barcelona court said: "The victim did not consent and there is evidence that, beyond the complainant's testimony, permits the rape to be considered proven.

"The court considers as proven the fact that the defendant abruptly grabbed the complainant, threw her to the ground and penetrated her vaginally, preventing her from moving, while the complainant said no and wanted to leave," it said.

Alves' lawyers had argued that the victim had been "glued" to the player while dancing at the nightclub, saying there was "sexual tension" between them. 

But in its 61-page decision, the court said that did not mean "that she consented to anything that might have subsequently happened". 

In October 2022, Spain's parliament passed the "only yes means yes" law which tightened the criminal code on sexual violence by requiring explicit consent for sexual acts. 

The move -- which had long been demanded by assault survivors and women's rights groups -- removed the requirement for rape victims to prove they were subjected to violence or intimidation. 

It sought to shift the focus away from the victims' resistance to a woman's free and clearly expressed consent. It was amended six months later to close a loophole.