CARACAS, Venezuela — When Venezuela’s opposition took control of the National Assembly this year, lawmakers vowed to use their powers to steer the country far from the legacy of former President Hugo Chávez.
They pledged to free scores of political prisoners who were languishing in jails, and to give away public housing to the people who lived in it. The new lawmakers even said they would hold a vote to remove Mr. Chávez’s handpicked successor, President Nicolás Maduro, and field their own candidate to run the country.
Yet time and again, the country’s courts — packed by leftist loyalists of Mr. Maduro only days before they handed over power — have fiercely chipped away at the new legislature’s efforts, leaving some here wondering whetherVenezuela’s lawmakers who are pushing for change have any real power at all.
Already, the courts have limited lawmakers’ power to remove judges, overturned a law meant to stabilize the economy and ratified an emergency decree that was rejected by legislators on the grounds that it overstepped Mr. Maduro’s authority.
But perhaps the biggest blow yet came on Monday night when the country’s Supreme Court overturned the law that would have freed about 120 prisoners, many of them activists or opposition politicians jailed in antigovernment protests. The judges rejected the bill as unconstitutional.
“It’s a clear strategy of the Maduro government to render the Assembly completely impotent,” said Michael Shifter of the Inter-American Dialogue, a Washington research group. “It’s a complete stalemate for them.”
On Tuesday, opposition politicians voiced disbelief at the court’s decision.
“Obviously this puts the government against the Constitution and against the people,” Freddy Guevara, a legislator with the Popular Will party, said in an interview. “If the people voted for us, it’s clear those who voted agreed with our agenda — including this amnesty law.”
The clash over the prisoners was one manifestation of an increasingly fierce conflict that has been playing out all year: Venezuela’s leftist old guard still controls most of the government, and the opposition wields a large majority in its Congress.
One telling example has been the dueling threats by the president and lawmakers to remove one another from office. The Assembly is exploring a number of strategies against Mr. Maduro, from a popular recall vote to an effort to change the Constitution to cut his term short. Mr. Maduro recently embraced a proposal to write his own constitutional amendment that would end the lawmakers’ terms.
“If I see it as the way to avoid the path to a coup and the co-opting of the National Assembly, then I myself will push for this,” Mr. Maduro said last week to a group of supporters at the presidential palace.
The political clashes come against the backdrop of increasing economic uncertainty for most Venezuelans. The country has suffered from shortages of basic foods for more than a year and soaring inflation. Meanwhile, oil prices, the economy’s main support, slumped this year and have stagnated since.
Water and power are in short supply. In a sign of the increasing desperation, Mr. Maduro went on television last week to declare three-day weekends for public workers for the next two months to save power. The president then urged women not to use blow dryers for the same purpose.
While the prisoner amnesty offered little to lessen these woes, it was seen as a bellwether of the Assembly’s powers to eventually act in the country’s larger crises.
Opposition officials say 120 people have been charged in cases stemming from their political views, including party leaders and former mayors. A large number of the arrests took place during a wave of protests in 2014, in which thousands of middle-class Venezuelans took to the streets in an effort to get Mr. Maduro to resign.
Perhaps the most high-profile arrest was that of Leopoldo López, the former mayor of a district in Caracas who headed the Popular Will opposition party. He was arrested after a speech during the protests and later sentenced to a 13-year sentence on charges like inciting violence.
The fate of the prisoners is a central point of tension between Venezuela and the United States. Last week, Assistant Secretary of State Roberta S. Jacobson, met with Mr. López’s wife, Lilian Tintori, in Washington.
“The release of political prisoners in Venezuela is long overdue, I join with their families to call for their immediate release,” Ms. Jacobson wrote on Twitter after the meeting.
Mr. Maduro and his supporters argue that those incarcerated are criminals, not political prisoners.
The president and his allies appear prepared for a long fight ahead in fending off the opposition through the country’s courts. Before the new assembly was seated, leftists replaced 13 of the court’s 32 justices with trusted jurists, ensuring that the court would remain loyal. The new court soon moved to block the election of four legislators from rural districts, denying the opposition a supermajority in the National Assembly.
Mr. Shifter at the research group said that if the Assembly finds the rest of the laws it passes this year overturned, it would strengthen the hands of hard-liners in the party who favor opposing Mr. Maduro by sending protesters into the street rather than fielding politicians in elections.
“That argument is going to be revived,” he said. “The faction that wants to increase pressure at the streets is going to say ‘I told you so. The ballot box strategy doesn’t work.’”