Real Madrid star Cristiano Ronaldo has agreed to pay the Spanish taxman 18.8 million euro ($20 million) to settle a tax fraud claim, a legal source said Friday.
The deal between the fiscal authorities and the advisors of the star comes hours before Ronaldo's Portugal face Spain in the World Cup in Russia.
The agreement still has to be ratified and will likely come with a two-year jail term -- although sentences of up to two years are not generally served in Spain.
The former Manchester United player, who is at the World Cup on the back of a third straight Champions League title with Real, appeared in court last July at Pozuelo de Alarcon, a wealthy Madrid suburb, to answer four counts of tax evasion.
Procecutors allege the five-time Ballon d'Or winner took "advantage of a company structure created in 2010 to hide 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 euros of revenue earned in Spain for the period 2011-2014 when his earnings in his country of residence totalled 43 million euros.
The Spanish taxman also found he did not declare 28.4 million euros in image rights agreed for 2015-2020, 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.
In May, legal sources indicated that the Portuguese, the world's highest paid sportsman last year with $93 million for 2016-2017 according to Forbes magazine, had proposed making a 14 million settlement.
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 two-million-euro fine in 2016 in his own tax wrangle and received a 21-month jail term, the latter reduced to a further fine of 252,000 euros equivalent to 400 euros per day of the original term.
In a statement issued by the Gestifute sports agency which represents him, Ronaldo insisted last year that he had "never hidden anything, nor have I had the intention of evading taxes".
Prosecutors had alleged a "voluntary and conscious breach of his fiscal obligations in Spain."