"This programme for the purchase of government bonds on secondary markets does not exceed the powers of the ECB," the European Court of Justice said.
A number of eurosceptic groups in Germany had taken the ECB to court over the OMT programme, asking the Federal Constitutional Court or Bundesverfassungsgericht to decide whether it was covered by the mandate of the ECB and contravened the prohibition of monetary financing – printing money to pay off debt - of the euro area member states.
Last year, the German Constitutional Court partially agreed with the plaintiffs, ruling that "there are important reasons to suggest that it goes beyond the ECB's monetary policy mandate and infringes on the powers of the member states and contravenes the ban on monetary deficit financing."
But Germany's highest court referred the case to the European Court of Justice (ECJ) in Luxembourg before issuing its final ruling.
In its ruling on Tuesday, however, the ECJ insisted that "the EU Treaties permit the ESCB (European System of Central Banks) to adopt a programme such as the OMT programme.
"The court finds that the OMT programme, in view of its objectives and the instruments provided for achieving them, falls within monetary policy and therefore within the powers of the ESCB," it said.
The ECB said in a short statement that it "welcomed the ruling", adding that it was "studying the text before communicating further.“