MADRID - The Spanish king’s brother-in-law was on Tuesday sentenced on appeal to five years and 10 months for syphoning off millions of euros in a case that has shamed the royals, the Supreme Court said.

Although he lost the appeal, Inaki Urdangarin’s revised sentence is slightly lower than the term he had been handed in February 2017, with the former Olympic handball player expected to begin his sentence within days.

However Urdangarin, who is married to Spain’s Princess Cristina, could make a last ditch-appeal to the Constitutional Court. Prosecutors had asked that the original sentence of six years and three months be increased to a maximum 10 years.

Now 50, Urdangarin was found guilty of taking millions of euros between 2004 and 2006 from a non-profit foundation he headed in the island of Majorca. Despite his sentence, he was allowed to remain free while pursuing an appeal.

The corruption scandal broke in 2010, sparking outrage at a time when Spain was going through a devastating financial crisis, becoming a symbol of the elite’s perceived corruption. The scandal soured the end of the reign of king Juan Carlos, who gave up the throne in June 2014 after 39 years, hoping his son Felipe who replaced him could freshen up the image of the monarchy.

Urdangarin and Cristina have been excluded from all of the family’s official public appearances since the scandal erupted, and in 2015 King Felipe VI stripped the couple of their titles of duke and duchess of Palma. They now live in Switzerland.