Updated

Opponents of Venezuela's socialist administration are preparing for a fight over a congressional bid to give amnesty to activists the opposition considers political prisoners.

Venezuela's opposition-controlled congress passed legislation late Tuesday that would free dozens of people imprisoned in connection with opposing the socialist revolution launched 17 years ago by late President Hugo Chavez.

Supporters launched fireworks around the darkened city, and lawmakers joined families of the prisoners in cheering "freedom!" as the legislation was passed.

The legislation was a key campaign promise during the 2015 legislative race that gave the opposition control of congress for the first time in more than a decade.

President Nicolas Maduro on Tuesday reiterated his determination stop the bill, and said it was an attempt to free murderers and terrorists.

"This law will not go into effect," he said. "Attempts to free terrorists and criminals cannot go through, do what they will."

Congress took up the bill without prior notice and approved it hours later, prompting Maduro to say the opposition bloc had used a sneaky fast track approach.

Congress President Henry Ramos said the bill was needed to free those who had been sentenced during show trails.

It is the congress' first major initiative since the session began in January.

The legislation could free more than 70 people, including politician Leopoldo Lopez, a well-known opposition leader.

The former Caracas area mayor was jailed in 2014 for his role in leading a sometimes bloody anti-government protest movement.

Socialist officials say that if congress overrides Madruo's veto, the Supreme Court will block the legislation. The court has thwarted nearly all congressional action this year, overturning attempts to limit the president's power, preventing congress from exercising more control over institutions and preventing lawmakers from taking their seats.

The opposition's other main promise has been to remove Maduro from office within the year.