Madrid: Barcelona's Argentine soccer star Lionel Messi has been sentenced to 21 months in prison and fined 2 million euros ($A3 million) 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.