Portuguese soccer star Cristiano Ronaldo reached a deal with Spanish prosecutors in his tax-evasion case, agreeing to a massive fine and a prison sentence, though he is unlikely to serve any time because he’s a first-time offender.

The news was reported Friday by Spanish newspaper El Mundo just hours before Portugal was set to take the field against Iberian rival Spain in its World Cup opener.

The World Cup is here. Want smart analysis, opinions, viewing guides and more? Sign up for our month-long newsletter. Every match day through the final July 15.

Ronaldo, who has played for La Liga titan Real Madrid since 2009, was accused by Spanish authorities of evading 14.7 million euros (about $17.1 million) in taxes between 2011 and 2014. Prosecutors allege that Ronaldo set up a company in 2010 to manage his image rights in the British Virgin Islands but then transferred those rights to a second company in Ireland, solely for the purpose of creating a “screen” to confuse Spanish tax authorities.

Under the agreement, that amount was reduced to 5.7 million euros (about $6.6 million). He will pay a fine of 18.8 million euros (about $21.8 million) but likely will not head to prison because, under Spanish law, first-time offenders who are sentenced to less than two years may serve their time on probation.

The 33-year-old forward, one of the world’s best and highest-paid players, denied the allegations through his representatives, according to Reuters. He originally offered to pay a 14 million euro fine (about $16.2 million), but Spanish officials countered with 18.8 million euros, which El Mundo said he accepted.

In 2016, Argentine star Lionel Messi — who plays for Real Madrid rival Barcelona — and his father were found guilty of similar tax-fraud charges in Spain, each of them receiving 21-month prison sentences that were not served because of the country’s first-time offender system. The court found Messi had funneled income earned from his image rights through countries such as Uruguay, Switzerland and Belize, evading more than 4 million euros (about $4.6 million) in taxes from 2007 to 2009. Messi paid 5 million euros (about $5.6 million) in back taxes in 2013, and he and his father were fined 2 million euros (about $2.2 million) and 1.5 million euros (about $1.7 million) after their guilty verdicts.

Read more about the World Cup: