Spanish tax authorities have given their approval for five-time Ballon d’Or winner Cristiano Ronaldo to pay close to €19 million ($22 million) to settle a tax fraud claim, prosecutors said Friday.

Prosecutors in Madrid said the deal with tax authorities and Ronaldo’s advisors also includes a two-year jail sentence which he won’t serve. Sentences of up to two years are generally not implemented in Spain for first-time offenders in non-violent crimes.

The 33-year-old former Real Madrid striker, who has moved to Juventus, appeared in court last July near Madrid to answer four counts of tax evasion. Procecutors allege Ronaldo hid income generated in Spain from his image rights from tax authorities.

He is alleged to have used companies in low-tax foreign jurisdictions – notably the British Virgin Islands and Ireland – to avoid having to pay the tax otherwise due.

In 2014, Spanish authorities say he was late in declaring that year just €11.5 millions of revenue earned in Spain for the period 2011-’14 when his earnings in his country of residence totalled €43 million.

The Spanish taxman also found he did not declare €28.4 million in image rights agreed for 2015-’20, leaving €14.7 million owing. His legal team had blamed the affair on a simple different interpretation of which revenue he was obliged to declare in Spain.

Had the case gone further, without the player offering a full settlement, he could have faced a fine of a reported 28 millions euros as well as a three-and-a-half-year jail term, according to the Spanish tax office union Gestha.

Ronaldo’s big La Liga rival, Barcelona’s Argentinian star Lionel Messi, paid a €2 million fine in 2016 in his own tax wrangle and received a 21-month jail term. The prison sentence was later reduced to a further fine of €252,000 equivalent to €400 per day of the original term.