A protester rides on a truck in front of a picture of President Nicolás Maduro and his predecessor, the late Hugo Chávez, during a June 7 anti-government rally in Caracas. (Carlos Garcia Rawlins/Reuters)

CARACAS, Venezuela — When your house is burning and smack in the path of a Category 5 hurricane, it’s probably not the best time to tear down the frame and jackhammer the foundation.

But those are the home improvement plans of President Nicolás Maduro, who is moving forward with a provocative attempt to rewrite Venezuela’s constitution despite the country’s descent into political and economic catastrophe.

The government has set July 30 as the date when voters will elect delegates for a constitutional assembly that will have the power to remake Venezuela’s laws. Maduro insists the goal is to “restore peace” to the country, but the effect so far has been quite the opposite, taking a fraught situation and giving it a fuse.

Maduro’s opponents see his rewrite bid as a naked power grab, and they want nothing to do with it. The Democratic Unity Roundtable (MUD), Venezuela’s big-tent opposition movement, says it will boycott the assembly. This past week its supporters tried to march again to the headquarters of Venezuela’s election authorities, carrying signs that read “The Constitutional Assembly is a Fraud.”

But their abstention risks giving Maduro a free hand to make sweeping legal and political changes beneath a scrim of democratic legitimacy. If the end result is an extension of Maduro’s rule, analysts say, the assembly could take the country into full-blown dictatorial rule.

Maduro appears to be thinking of a deadline of his own — next year’s presidential election. With the economy collapsing and his approval ratings hovering around 20 percent, he has few prospects for staying in power. But changing Venezuela’s constitution to postpone or cancel the election is one of them.

The July 30 vote has added new urgency to an already volatile standoff between Maduro and the swelling crowds of Venezuelans furious at his government. To his opponents, the event will be a firing squad taking aim at the remnants of Venezuelan democracy.

“They want to eliminate not only our democracy but any institution that still survives in Venezuela,” opposition leader Julio Borges said recently.

Anti-government protests have left at least 67 dead and 1,300 injured over the past nine weeks, with demonstrators demanding an early presidential election, the release of political prisoners and a return to democratic rule. The protest movement has repeatedly shown that it can bring massive crowds into the streets, but demonstrators’ near-daily attempts to march toward downtown government buildings have been turned back repeatedly by riot police. The country’s security forces are sticking with Maduro, at least for now.

A survey published this week by the respected Datanalisis polling firm found that 85 percent of Venezuelan respondents were opposed to Maduro’s plan for a constitutional assembly. The countdown to the event is intensifying anti-government anger, and it could boil over if opposition leaders’ worst fears come true and it/// ends up throwing Venezuela’s electoral calendar out the window.

Opposition lawmakers won a landslide victory in late 2015, taking control of the country’s legislative branch amid widespread frustration at the country’s breakdown. Since then Venezuela’s humanitarian crisis has only gotten worse, but Maduro has used the country’s judicial branch to stifle his opponents and their agenda.

Venezuela’s finances are so wrecked that the government has been borrowing from Wall Street banks at rates typically offered by pawnshops. But Maduro says his goal for the constitutional assembly will be the fortification of what he calls “The Communal State,” whose “communes” and “communal councils” will rival or replace Venezuela’s traditional economic and political institutions.

In theory, it’s a plan to channel resources directly to local communities. In practice, analysts say, it aims to sideline the country’s elected lawmakers and redirect public funds to government loyalists.

Another sore subject is the constitution itself. It was rewritten in 1999 after Hugo Chávez became president. But Chávez convened his constitutional assembly through the ballot box, with more than 80 percent of voters agreeing to the overhaul.

No such vote will be held this time, but Maduro has responded to recent criticism by assuring Venezuelans they will get a chance to approve or reject the new constitution once it’s finished. That’s not much comfort to his opponents.

Of the 543 deputies who will have the chance to rewrite the constitution, about two-thirds will be elected at the municipal level, while the rest will be representatives of student organizations, farmers, indigenous groups, the disabled and other categories that include “fisherman” and “communal councils.” The legal basis for this is highly controversial, and analysts say the system will give an advantage to rural districts where the government still enjoys some support. Still, given Maduro’s lack of popularity, the assembly could include many government opponents — if they decide to take part.

Several prominent figures who still consider themselves loyal to Chávez have criticized Maduro for wanting to alter a document the late leader considered so “perfect” he ordered millions of tiny copies printed and distributed throughout the country.

Attorney General Luisa Ortega, a figure close to Chávez who has recently broken with Maduro, filed a motion with Venezuela’s top court Thursday to block the assembly from going forward. She urged all Venezuelans to oppose it, calling Maduro’s decree order unlawful. “Only the people have the power” to convene a constitutional assembly, she said.

“I think with this [assembly] we are destroying President Chávez’s legacy,” Ortega told reporters outside Venezuela’s supreme court building.

Even the president of Venezuela’s federation of communes has come out against it, questioning its legality and complaining that the government hasn’t sought input from the group’s members.

But just as the proposal has created divisions among members of the Chavista movement, it has also raised doubts among government opponents about the best strategy for defeating it.

Many are still haunted by the opposition’s decision to boycott 2005 parliamentary elections, a move that ended up giving Chávez’s party unchecked power.

Maduro appears to be baiting his opponents into doing that again, even though the political dynamics are far different this time. Unlike Chávez, who for years had the majority of Venezuelans on his side, Maduro has dwindling support.

“In the language of poker, we’re looking at a bluff by the government,” wrote Francisco Rodríguez, a prominent Venezuelan economist who argued this week that Maduro’s opponents should hold their noses and join the assembly, because their advantage is so large they’ll be able to dominate it.

“In order for the bluff to work, the opposition has to fold,” he wrote. “In other words, the only way to win an election with 20 percent of the votes is to get the other side to sit out.”