A judge in Madrid on Thursday ordered the release of the former president of Spain's Caja Madrid savings bank, Miguel Blesa, which in 2008 acquired City National Bank of Florida, after a court quashed the prosecution of the case a day earlier.

As a result of the court decision, the attorney general's office requested on Thursday that Blesa be released and Judge Elpidio Silva granted that request.

Blesa was taken into custody on June 5 and had been held in a Madrid jail.

Judge Silva had ordered the former executive chairman of Caja Madrid held without bail in a case centering on the institution's 2008 acquisition of the Florida bank.

That case arose after Silva reopened an earlier inquiry over a loan of 26.5 million euros ($35.5 million) that Caja Madrid extended to travel conglomerate Marsans, which later went bankrupt.

Silva was troubled by what he saw as irregularities in Caja Madrid's purchase of City National Bank of Florida.

He also accused Blesa of seeking to structure the transaction in such a way as to avoid regulatory oversight.

Silva's decisions effectively created a "general case in search of those responsible for the general economic crisis we are experiencing," the three-judge appellate panel said in its ruling quashing the prosecution.

As there were no legal grounds to reopen the case against Blesa for the Marsans loan, all of the consequences of that decision are null and void, the judges said.

Caja Madrid was one of seven troubled regional savings banks that merged to form the Bankia group, which was nationalized by the Spanish government last year due to heavy losses.

Bankia's problems touched off a crisis that eventually prompted a roughly 40-billion-euro ($52-billion) European bailout of Spain's financial system. EFE