Spain's top court has annulled a 2.1 million euro ($2.37 million) fine imposed on 34-year-old FC Barcelona defender Gerard Pique in 2016 as part of a dispute over his tax returns in 2008.

The Supreme Court ruled Pique could deduct the contribution he paid to social security in Britain when he was playing for Manchester United a decade ago from his Spanish income tax, according to a court document released on Wednesday.

"Contributions paid to Social Security in another state of the European Union, when they are mandatory for workers, must be considered as deductible for income tax," the court ruled.

During the period in question, Britain was still in the European Union.

A spokesperson for the court was not immediately able to say whether Pique had already paid the fine. A spokesperson for Pique declined to comment.

Real Madrid outbreak grows after Alaba, Isco test positive 

Police raids Inter Milan offices as part of finances probe 

The ruling sets a precedent, a court statement said, meaning it could affect other athletes in a similar situation.

The Supreme Court also ruled in favour of Pique over the legitimacy of a company he had set up with his brother to manage his image rights. The court ruled the company was not a shell company, but rather a legitimate business.

Pique's long-term partner, Colombian singer Shakira Mebarak, is also involved in a tax dispute with the Spanish authorities.

A prosecutor has said she lived in Spain between 2012 and 2014 and failed to pay 14.5 million euros in tax on income earned during the period. Her lawyers say she did not live in Spain during those years.