Germany's constitutional court has rejected a challenge to a European Central Bank bond-buying program credited with helping keep the euro currency union from breaking up in 2012.

The court in Karlsruhe said Tuesday that the ECB had not exceeded its legal powers and rejected arguments from legislators and a citizens' group that the offer to purchase government bonds of troubled countries violated German law.

ECB President Mario Draghi announced the program in 2012 as bond market turmoil threatened the finances of several euro countries. The ECB offered to buy bonds of countries facing elevated borrowing costs if they submitted to financial reforms.

The program was never used, but the mere existence of an unlimited monetary backstop from the central bank helped ease market pressure on governments struggling with excessive debt.