MADRID (Reuters) - Former International Monetary Fund chief Rodrigo Rato was sentenced to 4-1/2 years in prison by Spain’s High Court on Thursday following a scandal over the widespread misuse of company credit cards during his tenure at lender Bankia.

Former International Monetary Fund chief Rodrigo Rato (C) walks between police officers as he leaves his office in Madrid April 17, 2015. REUTERS/Andrea Comas

Rato, who was economy minister in Spain and a prominent figure in the ruling People’s Party (PP) before moving to the IMF, chaired Bankia for two years until just before its state bailout in 2012.

He had been on trial along with 64 other executives and former board members of Bankia and its founding savings bank Caja Madrid.

The case is one of several high-level corruption investigations now coming to fruition and seen as a test of whether Spain’s rich and powerful are accountable to the law.

Last week, a Spanish court found the king’s brother-in-law guilty of using royal connections to overcharge regional governments through public contracts.

Rato and ex-Caja Madrid Chairman Miguel Blesa, who was sentenced to six years in jail, were convicted of misappropriating funds, the court said in a written ruling.

Rato had denied any wrongdoing, arguing the expenses he accrued on the Bankia credit cards were legal.

Neither Blesa’s lawyer, Carlos Aguilar, nor Ratos’ lawyer, Ignacio Ayala, responded to requests for comment.

The so-called “black cards” case sparked widespread anger when the scandal first broke in 2014, at a time when Spain was recovering from years of recession, mass layoffs and a banking crisis partly triggered by Bankia’s massive bailout.

The court considered in its ruling both Rato and Blesa responsible for overseeing the misuse of credit cards and said that they could have reversed the practice.

“The defendants Miguel Blesa (...) and Rodrigo de Rato Figaredo were aware of the decision they made to allow business cards to circulate (...) with no legal and statutory support, based, as they said, on a principle of trust, which was not the case,” the court said in its ruling.

The cards were used to buy jewels, holidays and expensive clothes, according to documents filed with the court, but also to fund more mundane purchases such as trips to the cinema.

Before chairing the Washington-based IMF between 2004 and 2007, Rato was deputy prime minister in the conservative PP’s government in 1996.

In total, prosecutors were investigating some 12 million euros in spending on the cards between 2003 and 2012 by the 65 former Bankia executives, including Rato and Blesa.

The court ruling can be appealed before Spain’s Supreme Court.