* Constitutional court upholds 2012 verdict okaying bailouts
* German judges say parliament's budget powers safeguarded
* Ruling on ECB's main anti-crisis measure deferred to EU court
By Michelle Martin and Ilona Wissenbach
KARLSRUHE, Germany, March 18 Germany's Constitutional Court upheld the legality of the euro zone's bailout fund on Tuesday, affirming a preliminary ruling during the debt crisis in 2012 that gave a green light to the European Stability Mechanism (ESM).
The court reiterated that the 700 billion euro ($975 billion) fund did not violate the rights of Germany's Bundestag, or lower house of parliament, to decide budgetary matters as long as it had sufficient oversight powers over the ESM.
Klaus Regling, head of the ESM, said in a statement that the verdict was "a good decision" both for Europe and for Germany and added that the court had "provided clarity once and for all" by confirming the overall tenor of its preliminary ruling.
The court said measures had been taken to ensure Germany's liability to the ESM was limited to 190 billion euros, with any increase subject to a vote by the Bundestag. It also confirmed the legality of the "fiscal pact" for stricter European Union budget discipline, championed by Chancellor Angela Merkel.
Finance Minister Wolfgang Schaeuble, who had appeared for the government during the hearings, welcomed the final ruling which he said "confirmed our course for securing the stability of the currency" and boosted confidence in the euro zone.
Among the record 35,000 plaintiffs were lawmakers from Merkel's conservatives and the opposition, and academics. They argued that the ESM amounted to an illegal transfer of sovereignty from Berlin to Brussels.
Peter Gauweiler, a Bavarian conservative lawmaker who was the most prominent plaintiff, said the lawsuit had succeeded in ensuring democratic controls of the ESM and limiting taxpayers' exposure to bailouts of over-indebted euro zone members states.
The threat to democratic principles and to the Bundestag's supremacy in budget matters had "not been fully eradicated, but significantly reduced" by the verdict, Gauweiler said.
The court in Karlsruhe has a history of delaying EU treaties to test their compatibility with German law, usually imposing the condition that parliament has to be consulted fully.
But outside the court a few demonstrators from a group called "Direct Democracy" were dressed as prisoners and slaves to protest at the lack of democratic control of the ESM.
"The taxpayers' sole purpose now is simply to cough up and then some board of directors whom we haven't elected decides where our money will go," 26-year-old Marcus Anton said.
STILL DOUBTS ON OMT
There were no direct comments on the legality of the European Central Bank's "unlimited" bond-buying scheme, the flagship emergency measure against the debt crisis.
The German court took the unprecedented decision last month to defer a ruling on the ECB's Outright Monetary Transactions (OMT) programme - which is credited with saving the euro zone - to the European Court of Justice in Strasbourg.
That court is seen as less of a threat to the OMT, which was announced by ECB chief Mario Draghi in 2012 and helped to keep the euro zone together by promising potentially unlimited purchases of the sovereign bonds of member states.
The German court could still give its own verdict after an ECJ ruling, which is likely to take over a year. It has already said there was good reason to think the OMT exceeded the ECB's mandate and violated a ban on the ECB funding governments.
Referring to Tuesday's decision, Christian Schulz, an economist at Berenberg bank, said it would have been a major surprise if the Constitutional Court had contradicted its own preliminary verdict from 2012.
"It's important that we have certainty about the legality of the ESM in the eyes of Karlsruhe because it is central to the financial stability architecture of the euro zone," he said.
But the court had "created much bigger trouble" with its negative comments on the OMT in February, "because without that, the ESM is simply too small - it is not big enough to defend countries like Spain and Italy", said Schulz.
Economist Hans-Werner Sinn, head of the Ifo economic think-tank, also said the court's insistence on Bundestag approval of each ESM transfer would have implications for EU plans for a "banking union" scheme to tackle troubled banks.
It meant that "you can't use the ESM's funds as an automatic backstop for this wind-up mechanism if it doesn't have enough money", Sinn told reporters.