Barcelona's Argentine soccer star Lionel Messi was sentenced on Wednesday to 21 months in prison and fined 2 million euros (1.71 million pounds) after being found guilty of three counts of tax fraud, although it is unlikely he will serve time.

The Barcelona court handed the same sentence to the player's father, Jorge, with a 1.5 million euro fine. Both defendants have around five days to appeal to the supreme court, the Barcelona court said in its statement.

Spanish law is such that any sentence under two years for a non-violent crime rarely requires a defendant without previous convictions to serve jail time. A spokeswoman for the court confirmed Messi was unlikely to be imprisoned.

Messi, 29, and his father defrauded the Spanish tax office of almost 4.2 million euros between 2007 and 2009 by using a web of shell companies to evade taxes on income from the player's image rights, the court said in a written ruling.

The companies - with names such as Sport Consultants and Sport Enterprises - were based in tax havens such as Belize, Uruguay and Switzerland where legislation kept the identities of their owners secret, according to the ruling.

Messi, five-times World Player of the Year, admitted during the trial to signing contracts protecting his image rights but said he had no knowledge he was partaking in any wrongdoing or defrauding the Spanish state.

He said his father had control over his financial affairs, but the court said on Wednesday that this was not enough to avoid charges.

"(His) avoidable ignorance, which was derived from indifference, is not an error, and it does not remove responsibility," the presiding judge, Mercedes Armas Galve, wrote in the statement.

"The information that the accused avoided having was, in reality, within his reach via trustworthy and accessible sources."

Messi, who has held Spanish nationality since 2005, and his father had already paid 5 million euros to the tax authorities as a "corrective" measure after formal investigations were opened.

The footballer is 10th on Forbes Magazine's list of the world's highest-earning athletes over the past decade, with an estimated income of $350 million during this period.

Barcelona football club, of which Messi is the leading goal scorer of all time in all competitions, said in a statement on its website following the ruling that it considers the player to be free of criminal liability .

"The Club ... considers that the player, who has corrected his position with the Spanish tax office, is in no way criminally responsible with regards to the facts underlined in this case," the club said.

Messi, who has won eight La Liga titles, four King's Cups and four Champions League crowns with Barcelona, said last month he was quitting international soccer after the Argentine national side, of which he was captain, lost on penalties to Chile in the Copa America tournament.