MADRID — Spain’s banking crisis has moved into the courtroom.

On Wednesday, a Spanish national court judge ordered Rodrigo Rato, a political ally of Spain’s prime minister and former head of the International Monetary Fund, to appear in court to face criminal fraud accusations over his recent stewardship of the giant mortgage lender Bankia.

Bankia, which the government seized in early May, is at the center of the financial storm that has led Spain to seek a European bailout of its banks. But several other Spanish banks are also embroiled in court cases, brought by politicians, shareholders and prosecutors, as well as the government’s own bank overhaul agency.

The spate of lawsuits could further complicate efforts to clean up and consolidate Spain’s banking sector, given that Madrid has yet to complete the terms of the 100 billion euro ($125.3 billion) bailout that euro currency union finance ministers agreed to last month.

“We are entering a new phase in this banking crisis, adding to the questions of solvency the need to establish accountability for past mistakes,” said José Luis de la Calle Sánchez, an independent lawyer who specializes in banking matters.