People set to fork over $21 million rarely find themselves in the mood to celebrate, but Cristiano Ronaldo had reason to be happy, given that he avoided a jail sentence while settling tax-fraud charges Tuesday in Spain.

Later in the day, though, Ronaldo sparked another wave of negative attention, after he tweeted a celebratory photo of himself in a private jet on his way back from Madrid. The Juventus forward was criticized for appearing insensitive to the plight of Emiliano Sala, an Argentinean soccer player who is feared dead after the small airplane he was in disappeared over the English Channel on Monday night.

Sala, 28, was traveling from France to Cardiff in Wales to join his new club when his flight was lost to radar. British and French authorities suspended their search Tuesday amid high winds and rough seas, with one official saying, “After all this time, the weather’s quite cold, the water is very cold out there. . . . I am not expecting anyone to be alive.”

While playing for Nantes this season, Sala accumulated a career-high 12 goals, good for fifth in Ligue 1 and just one behind Paris-Saint Germain superstar Neymar. Word of the 28-year-old’s disappearance and possible death produced messages of shock and concern from around the soccer world, including former French star Thierry Henry describing the situation as “devastating news.”

Thus some Twitter users took issue with the timing of Ronaldo’s photo, which showed him smiling to a camera while seated in the jet. The only caption he appended to the tweet, posted to his 76.3 million followers, was a trio of emoji — a smiling face, an airplane taking off and a thumbs-up.

“Incredible levels of insensitivity and selfishness here,” one soccer fan said in reply to Ronaldo’s tweet. “Where is his team to tell him today is [not] the right day to post this at all?” asked British sports-TV personality Layla Anna-Lee, who added, “So sad.”

Earlier in the day, in a courtroom not far from where he excelled for Real Madrid for nine seasons, Ronaldo pleaded guilty to tax fraud and agreed to pay a fine of nearly 19 million euros, or $21.6 million. He had been facing the prospect of a jail term of 23 months, but judges in Spain have the leeway to suspend sentences of up to two years for first-time offenders.

Ronaldo’s appearance Tuesday did not take long. He had agreed to the plea deal last year with Spanish authorities, after testifying in 2017 that he did not mean to avoid taxes. Prosecutors had accused him of using shell companies from 2011 to 2014 to get around taxes on image-licensing revenue, making Ronaldo one of several soccer stars, including Barcelona’s Lionel Messi, accused of dodging taxes in Spain.

His arrival at and departure from the Madrid courthouse, accompanied by his partner, Georgina Rodriguez, caused a predictable media scrum. As Ronaldo was whisked past hundreds of journalists on his way to his flight back, he reportedly said, “It’s done.”

Ronaldo, 33, also is under investigation by police in Las Vegas for an alleged sexual assault there in 2009. Authorities in that city have asked for help from Italian counterparts in obtaining a DNA sample from the five-time FIFA Ballon d’Or winner, who in his first season with Turin-based Juventus.

Read more from The Post: