Lionel Messi, hailed by many as the greatest footballer of all time, may leave Spain after continuing to fall foul of the tax authorities, sources have said.

The player, who earlier this year agreed a new €50m (£40m) salary with Barcelona, has complained that he is being singled out for special treatment compared with other elite sports players in Spain with disputed tax affairs.

Messi had his first run-in over tax last year when he was accused of concealing €4.1m earned from image rights in shell companies in Belize and Uruguay.

Under Spanish law, anyone who has more than €120,000 in undeclared income automatically faces a jail sentence, but this is generally waived if the offender agrees to pay. Messi paid an agreed €5m in settlement but the authorities have decided to force the Argentinian-born player to stand trial, with the possibility of going to prison.

The Barcelona coach, Luis Enrique, says he is sure striker Lionel Messi is happy at the Catalan club Guardian

Sources close to Messi told the newspaper El Confidencial: “… there are other elite sportspeople who have tax problems and they’ve all been settled administratively, as was the case with Real Madrid players Xabi Alonso and Iker Casillas and tennis star Rafa Nadal. Messi is the only one who faces legal proceedings that could end with him going to jail. He’s fed up with Spain and that’s why he wants to leave.”

The sources said that in a single year Messi had paid €52m in income tax and fines “and that should be that”. They said Messi appeared to be a victim of double standards. “They started with his image rights, then his signing fee – who knows where it will end.”

In the current atmosphere of hostility between Catalonia and the Spanish government, the fact that the Real Madrid players settled out of court while Barcelona’s star faces criminal proceedings is seen as further evidence of an anti-Catalan conspiracy.

The four-times winner of football’s top award, the Fifa World Player (renamed the Ballon d’Or in 2010), Messi hinted in an interview with an Argentinian sports paper earlier this week that he may consider leaving Barcelona, the club that has nurtured his talent since he moved there at the age of 13.

Now 27, Messi said he would like to end his career at Barcelona but the situation was difficult and “sometimes things don’t work out as you planned”.

A comment by his teammate Xavi Hernández that “Messi would be an even better player in the English Premier League because it’s not so defensive” did nothing to dispel rumours that he might be leaving.

Messi has won six Spanish league titles and three champions leagues with Barcelona and led Argentina to the finals of the World Cup this year.