Spanish tax authorities have accused soccer player Lionel Messi, pictured, and his father, Jorge Horacio, of $5.3 million worth of tax fraud. Reuters/Marcos Brindicci

The world’s best soccer player, Lionel Messi, arrived at a Barcelona court Friday morning to face allegations of tax fraud that could put him behind bars for six years if he's found guilty.

The 26-year-old Argentinian and his father, Jorge, are charged with using foreign companies in Belize and Uruguay to sell his image rights, defrauding the Spanish taxman of 4 million euros ($5.3 million) in the process.

The four-time FIFA World Player of the Year, widely known for his mastery of so-called Tiki-Taka tactics, denies the allegations, which date to 2007.

As the Barcelona club forward arrived at the courthouse in the affluent Gava area of the city, he gave a thumbs-up to waiting fans.

The Spanish tax authority has accused Messi and his father of three counts of defrauding the Spanish state of taxes.

While Messi’s father has already paid the tax back, the Spanish authorities are taking hard line on tax evasion because of the country’s perilous financial situation, hoping that a prosecution of one of the world’s wealthiest and best-known sports stars will serve as a threat to other would-be tax evaders.

If convicted, Messi and his father could face up to six years in prison.

Messi is one of the world’s highest-paid athletes, pulling in around 16 million euros a year ($21.6 million) in salary alone. He also has multimillion-dollar sponsorship agreements with some of the world biggest brands.

The image-rights issue relates to contracts he held with PepsiCo Inc. (NYSE:PEP), Adidas, Banco Sabadell, Danone, Proctor & Gamble (NYSE:PG) and the Kuwait Food Company.

At his previous court hearing in June, Messi said that he and his father "have never committed any infringement. We have always fulfilled all our tax obligations."