MADRID (AP) — Cristiano Ronaldo smiled broadly after leaving court Tuesday despite the unwanted trip back to Madrid to plead guilty to tax fraud.

The Juventus forward, who was facing charges stemming from his days at Real Madrid, spent about 45 minutes in court to sign an agreement which cost him nearly 19 million euros ($21.6 million) in fines. He was also given a two-year suspended sentence.

Ronaldo will not have to serve time in prison because judges in Spain can suspend sentences for two years or less for first-time offenders.

Ronaldo arrived in a black van and was wearing sunglasses, a black sports coat, black pants and white tennis shoes. He stopped to sign an autograph before walking up some stairs leading to the court house. He was accompanied by his lawyers and his partner, Georgina Rodriguez. Police officers escorted him.

A few hundred journalists waited outside but the Portuguese player did not stop to talk.

The court had dismissed Ronaldo's request to enter the building directly from the parking lot, which would have allowed him to avoid the media. The request was made for security reasons, but the court said it didn't think the measure was needed despite the player's notoriety.

Court officials said Ronaldo didn't make any comments while in the courtroom to sign the agreement.

Smiling on his way out of the court house, he again stopped to sign autographs for a few fans who were wedged among the journalists.

Ronaldo made the deal to plead guilty with Spain's state prosecutor and tax authorities last year.

In 2017, a state prosecutor accused Ronaldo of four counts of tax fraud from 2011-14 worth 14.7 million euros ($16.7 million). Ronaldo was accused of having used shell companies outside Spain to hide income made from image rights.

The accusations didn't involve his salary from Real Madrid, his club from 2009 until joining Italian champion Juventus last year.

Separately, Ronaldo is facing a rape allegation in the United States.

Kathryn Mayorga filed a civil lawsuit in Nevada in September claiming Ronaldo raped her in his Las Vegas hotel room in 2009. Police reopened an investigation into the allegation at her request. Ronaldo has denied any wrongdoing.

Former Real Madrid player Xabi Alonso also was in court in Madrid on Tuesday. He is accused of defrauding tax authorities of about 2 million euros ($2.3 million) from 2010-12.

The retired Spain midfielder denied any wrongdoing after spending nearly three hours in the court house.

"I've done everything correctly, never tried to hide anything," he said. "I'm confident justice will be done."

Alonso had initially been found innocent but the case against him was reopened.

He could be sentenced to five years in prison and ordered to pay a fine of 4 million euros ($4.5 million), in addition to the amount allegedly defrauded. The charges are related to Alonso's income from image rights. He played for Madrid from 2009-14.

RECOMMENDED FOR YOU

The Switzerland-based Court of Arbitration for Sport (CAS) dealt out a scolding to the executives of the Trinidad and Tobago Football Association (TTFA), while also confirming the official termination of their action against the Fédération Internationale de Football Association (FIFA).

No West Indies player will be forced to travel on the tour of England if they feel uncomfortable with arrangements, Cricket West Indies chief executive Johnny Grave has said.

Local racing authorities have not given up on seeing the resumption of the sport sooner rather than later, and attempts are being made to gain permission from the Government to re-start racing at Santa Rosa Park, Arima in just over two weeks.

Kelly-Ann Baptiste is preparing for her fifth Olympic outing, and is grateful to have another year of preparation ahead of her final shot at precious metal on the world’s biggest sporting stage.

Like me, the pigeon on the ledge of a third floor window at Express House is surveying life on the Brian Lara Promenade. There is semi-traffic on the ground below.