The European Central Bank

The European Central Bank (ECB) decision in 2015 to buy government bonds was valid and within its mandate, the EU's top court ruled Tuesday.

Moreover, the bond-buying program was not a form of financing public debt - which is prohibited - because it bought bonds on secondary markets, the judges said.

Under the law, it is clear that "the ECB and the central banks of the member states may, in principle, operate in the financial markets by buying and selling outright marketable instruments in euro," the judges wrote in a press release.

Several German lawsuits had challenged the bond purchase programme, which was an attempt to kick-start the eurozone's sluggish economy after the financial crisis. By buying corporate and government bonds, the ECB hoped to lower interest rates as a way of boosting consumption and investment