Next, the court ruled in favor of dissolving the legislature entirely, a move that provoked such an outcry in Venezuela and abroad that the decision was soon reversed.
Now, President Nicolás Maduro is pushing a radical plan to consolidate his leftist movement’s grip over the nation: He is creating a political body with the power to rewrite the country’s Constitution and reshuffle — or dismantle — any branch of government seen as disloyal.
The new body, called a constituent assembly, is expected to grant virtually unlimited authority to the country’s leftists.
Venezuelans are going to the polls on Sunday to weigh in on the plan. But they will not have the option of rejecting it, even though some polls show that large majorities oppose the assembly’s creation. Instead, voters will be asked only to pick the assembly’s delegates, choosing from a list of stalwarts of Mr. Maduro’s political movement.
The new assembly will rule above all other governmental powers — technically even the president — with the kind of unchecked authority not seen since the juntas that haunted Latin American countries in decades past.
“This is an existential threat to Venezuelan democracy,” said David Smilde, an analyst at the Washington Office on Latin America, a human rights advocacy group.
The list of delegates includes powerful members of the president’s political movement, including Diosdado Cabello, a top lawmaker in the ruling Socialist Party who was involved in a failed coup attempt in the 1990s, and Cilia Flores, the president’s wife.
But the push to consolidate power also puts the country at a crossroads, one laden with risk.
As Mr. Maduro effectively steers his country toward one-party rule, he sets it on a collision course with the United States, which buys nearly half of Venezuela’s oil. On Wednesday, the Trump administration froze the assets of, and forbade Americans to do business with, 13 Venezuelans close to Mr. Maduro, including his interior minister and heads of the army, police and national guard.
The administration is warning that harsher measures could follow, with “strong and swift economic actions” if the vote happens on Sunday, according to Mr. Trump. In a statement, he called Mr. Maduro a “bad leader who dreams of becoming a dictator.”
There is also the potential powder keg on Venezuela’s streets. Infuriated by Mr. Maduro’s government, the opposition has mobilized more than three months of street protests that have crippled cities with general strikes, rallies and looting. More than 110 people have been killed, many in clashes between the state and armed protesters. Few know how protesters will react to newly imposed rulers.
Even the members of the new assembly themselves are a wild card. Their power will be so vast that they could possibly remove Mr. Maduro from office, some analysts note, ending a presidency that has been deeply unpopular, even among many leftists.
“It’s a crapshoot, a Pandora’s box,” said Alejandro Velasco, a Venezuelan historian at New York University who studies the country’s leftist movements. “You do this and you have so little control over how it plays out.”
Mr. Maduro contends that the government restructuring is necessary to prevent more bloodshed on the streets and save Venezuela’s failing economy, which is dogged by shortages of food and medicine.
The president has refused to negotiate with street protesters, calling some of them terrorists and asserting that they are financed by outside governments trying to overthrow him. A new governing charter would give him wide-ranging tools to “construct peace,” he and leftists have said.
“We need order, justice,” Mr. Maduro said during an interview with state television this month. “We have only one option, a national constituent assembly.”
The turmoil gripping Venezuela illustrates the sweeping declines in popularity for the Venezuelan left since the death of its standard-bearer, President Hugo Chávez, in 2013.
It was Mr. Chávez who oversaw the last rewrite of the Constitution, in 1999, which was widely backed by the voters who had propelled him to office in the belief that the country’s rule book favored the rich.
That new Constitution — and rising oil prices — fueled a Socialist-inspired transformation in Venezuela. It helped enable Mr. Chávez to redistribute state wealth to the poor, nationalize foreign assets and make him popular with his supporters. The Constitution also left open the possibility of another constituent assembly in the future.
Now Mr. Maduro has taken that option at a time when the leftists are dogged by their deepest crisis in decades. This time, Venezuelans are seeing it less as a stab at reform than as an attempt by a struggling ruling class to maintain power.
“It’s a last-ditch effort to secure his base,” Mr. Velasco said. “He’s doing it at a moment of weakness.”
Under the rules of the vote, the constituent assembly would take the reins of the country within 72 hours of being officially certified, though it is unclear to most people what would happen after that.
Some politicians have already suggested that governorships and mayors be replaced with “communal councils.” Top members of Mr. Maduro’s party have identified Luisa Ortega, the attorney general, who has criticized Mr. Maduro’s crackdown on protesters, as someone to be immediately dismissed.
But many fear that a likely first step will be the abolition of the country’s legislature, a tactic first used by Mr. Chávez when rewriting the Constitution in 1999.
Leftists did not control the legislature then, and the same is true today. For more than a year, courts close to Mr. Maduro have chipped away at the powers of opposition lawmakers there, overturning laws like a measure to release political prisoners and stripping it of budgetary oversight.
Organizers of a symbolic vote against the measure this month said more than seven million ballots had been cast, with 98 percent backing the opposition.
Juan Guaidó, an opposition lawmaker, fears that the constituent assembly will dismantle his chamber, effectively liquidating any political power held by Mr. Maduro’s rivals.
“If there was anything left of Venezuela’s battered democracy, it was the powers that were legitimately elected by the people, like the National Assembly,” he said. The vote would create a “totalitarian and repressive dictatorship.”
Still, some say the opposition has failed to offer clear alternatives to Mr. Maduro. Eva Golinger, an American lawyer who was a confidante of Mr. Chávez’s, said rivals of the leftists had focused too heavily on wresting power from the president, something that could risk a wider civil conflict.
“They only rally around regime change,” said Ms. Golinger, who opposes how Mr. Maduro has gone about the constitutional rewrite.
The constituent assembly would also be able to take on one piece of work left unfinished by Mr. Chávez: creating a more Socialist Constitution.
Mr. Chávez later tried to amend his 1999 document with changes that he argued would speed the course of his populist revolution. But the additional measures were narrowly defeated when they were taken to voters in 2007.
Mr. Maduro has indicated that he intends to pick up where Mr. Chávez left off. He has suggested a nine-point outline that includes increasing public spending for education and health care, giving Socialist organizations increased governing abilities and taking unspecified measures to prevent foreign meddling in Venezuela.
Analysts also expect that the new Constitution could dig deeper into the economic policy favored by the president, which many economists blame for exacerbating the country’s economic crisis.
With much of the opposition expected to boycott the vote, it was mainly Venezuelans loyal to Mr. Maduro’s party who were eager to head to the polls on Sunday.
María Elena Pérez, 54, a leftist activist in Caracas, the capital, said it was time for a new rule book.
“The current Constitution is weak, and there’s a lot that needs to be fixed,” she said.
In the week ahead of the vote, potential delegates were making their pitches on Venezuelan airwaves.
In one video, Ysmael Modoy, a candidate from the western state of Portuguesa, urged voters to defend Mr. Chávez’s legacy and promised a new Constitution that better battled corruption.
Some sought a lighthearted tone. Antonio León, a candidate who goes by the nickname the Mask, entered his commercial dancing and singing while crossing an empty street. He didn’t address any changes to the Constitution, but promised voters that he would make it easier to get government rations.
“Remember: You are love, you are life,” he said before returning to his dance.