Venezuela's President Nicolas Maduro gestures while he attends to a rally against the opposition's amnesty law at Miraflores Palace in Caracas, April 7, 2016. REUTERS/Carlos Garcia Rawlins

CARACAS (Reuters) - Venezuela’s top court on Monday struck down an amnesty law approved last month by the opposition-dominated Congress, scuttling an effort by critics of President Nicolas Maduro to secure the release of jailed opposition activists.

The supreme court’s constitutional chamber ruled that the law violated constitutional principles because it promoted impunity and offered amnesty for crimes that were not eligible for such treatment.

“This impunity law cannot pass,” said Maduro, who had vowed to veto it, in a televised broadcast minutes before the court’s decision was released. “If we want peace, that law cannot pass.”

The court has repeatedly backed Maduro in his disputes with the legislature following the opposition’s blowout victory in December polls that gave it a two-thirds majority of seats.

Opposition leaders accuse Maduro of using allies in the courts to run roughshod over the assembly, noting that ruling Socialist Party legislators used lame-duck sessions late last year to name party militants to the bench.

“The autonomy of the legislative branch is not up for discussion, and for that reason #Amnestyislaw,” wrote the National Assembly’s leadership via the institution’s official Twitter account. The tweet includes a link to a petition demanding the law’s enactment.

Opposition leaders had promoted the law to benefit high-profile government adversaries, including Leopoldo Lopez, who was arrested in 2014 on accusations that he helped spur a wave of demonstrations that ultimately left more than 40 people dead.