Investors breathed a sigh of relief that Federal Constitutional Court removed the threat that Germany would be prevented from ratifying the treaty setting up the European Stability Mechanism - a new, permanent 500 billion euro fund for the 17 countries that use the euro and a central part of efforts to contain the debt crisis.

Stocks across Europe rallied strongly, the euro spiked to a four-month high of $1.2906 and the borrowing rates of troubled economies, such as Spain and Italy, eased further.

The court did, however, insist that Germany must secure legal guarantees that the Parliament must vote on any further increases in its contributions to the ESM. These guarantees must be secured before President Joachim Gauck signs the fund into law.

Opponents had challenged Germany's ratification of the ESM, arguing that it violated the country's constitution. They had sought an injunction preventing Gauck from signing the legislation into law.

They also had sought to block the so-called fiscal compact, the budget-discipline pact pushed by Chancellor Angela Merkel and signed by most European Union countries. That call was also rejected.

Jean-Claude Juncker, who leads meetings of the eurozone's finance ministers, said he plans to hold the first meeting of the ESM's board of governors on Oct. 8.

Germany's ratification of the ESM was key because without the country's participation the fund could not have worked. Germany, as Europe's biggest economy, is the No. 1 contributor the fund.

Germany is liable for about 27 percent - about 190 billion euro - to the overall European bailout scheme of 700 billion euro, which includes the ESM and remaining money from the current temporary fund, the European Financial Stability Facility.

The taxpayer-backed fund is crucial to the eurozone's debt crisis resolution efforts because it can loan money to governments that can't borrow otherwise, and markets had been nervously awaiting the ruling.

Federal Constitutional Court Chief Justice Andreas Vosskuhle said the case posed "special challenges" - not just because of the political significance of the ESM, but because the financial and political consequences of a possible delay were "almost impossible to estimate reliably."

The court still has to deliver a full ruling on the substance of the plaintiffs' complaints. But Vosskuhle made clear that his court's ruling on the calls for a temporary injunction - delivered after two months of deliberations - reflected the likely outcome of the case.

"The examination showed that the laws that have been challenged with high probability do not violate the constitution," he said.

Still, he said Germany must get legal guarantees before ratification that the provisions of the ESM can't be interpreted in such a way that Germany's financial liability could be increased without the approval of Berlin.

Germany must also ensure that provisions in the ESM treaty demanding "professional secrecy" from fund employees don't stand in the way of the German Parliament being informed in full about fund decisions.

"These provisions are above all intended to prevent a flow of information to unauthorized third parties, for instance to actors on the capital market, but not to the parliaments of the member states," the court said in its ruling.

Wednesday's ruling was in line with a string of previous rulings in which the Federal Constitutional Court has approved European political and financial integration, and eurozone rescue measures, while insisting that the German Parliament's right to have an early and thorough say on them be safeguarded.

Vosskuhle said it wasn't his court's job to decide on the "usefulness and sense" of measures approved by a large majority of German lawmakers.

"No one can say for sure what measures are actually the best for Germany and the future of our united Europe in the current crisis," he said. He insisted, however, that "only as a democratically legitimized community governed by the rule of law does Europe have a future."

It was not immediately clear when President Gauck would be able to sign the measure, which was approved by Parliament in June with cross-party support - and when the ESM, which originally was slated to open for business at the beginning of July, could start work.

Chancellor Angela Merkel was due to address lawmakers later Wednesday.