Barcelona has come under fire over a social media campaign in support of Lionel Messi and his father Jorge after the Argentine pair were sentenced to prison terms this week over tax fraud.

The campaign, under the hashtag #WeAreAllLeoMessi, asks Barcelona fans to "express their sympathy for the greatest footballer in the world by voicing their unconditional support on social networks."

Messi, 29, has played his entire club career for Barcelona.

"We want Leo to know that he is not alone," the club said on its website.

"All members, supporters clubs, fans, athletes, media and everyone else are invited to participate."

Loading

Club president Josep Maria Bartomeu also tweeted: "Leo, those who attack you are attacking Barca and its history. We'll defend you to the end. Together forever!"

A Barcelona city court sentenced Messi and his father on Wednesday to prison terms of 21 months after they were found guilty of three counts of tax fraud, although it is unlikely they will spend time behind bars.

Like many Twitter campaigns, however, #WeAreAllLeoMessi has been hijacked, with many infuriated by the idea of supporting a "tax cheat".

Loading

Loading

Loading

Loading

Loading

Loading

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 and a spokeswoman for the court confirmed Messi was unlikely to be imprisoned.

Lionel Messi (R) and his father Jorge Horacio Messi were sentenced to 21-month prison terms for three counts of tax fraud. ( Reuters:Alberto Estevez )

It is the second campaign in support of Messi in the last two weeks.

Argentines have called on him to reverse his retirement from international football, a decision he took after his country's loss on penalties to Chile in the Copa America Centenario final in the United States on June 26.

It was the fourth final in a major international tournamentand third as Argentina captain that Messi has been on the losing side, including the 2014 World Cup in Brazil.

Reuters/ABC