Portuguese footballer Cristiano Ronaldo was fined almost 19 million euros ($21m) for tax fraud on Tuesday but will avoid serving a 23-month prison sentence after agreeing on a deal.

A huge media presence met the player outside the court after the judge refused to accept a video call appearance or to enter the building by car to avoid the spotlight.

The former Real Madrid forward, 33, had already agreed to the deal to pay the fine after pleading guilty last year to the charges brought by Spanish state prosecutors and tax authorities.

The charges against the striker stem from his days at the Spanish League Real Madrid for whom he played from 2009-2018. He was accused of using shell companies outside Spain to hide income made from image rights.

He appeared at court relaxed with his Spanish fiancée Georgina Rodriguez, smiling and signing autographs on his way in and spent around 45 minutes in the court building.

Under the Spanish law, the first offender can serve anything less than a two-year sentence under probation which means Ronaldo is unlikely to spend any time at all in jail, serving it on probation instead.