BOGOTÁ, Colombia — A vote to pick the people who will restructure Venezuela’s government was marred by violence on Sunday as one candidate was killed in his home the night before, an explosion was set off on a busy street and at least eight people died in clashes between protesters and the police.
President Nicolás Maduro had ordered a rewriting of Venezuela’s Constitution, its governing charter. Sunday’s election was simply to pick the members of the constituent assembly that will carry it out. Nearly all candidates were politicians close to Mr. Maduro, presumably assuring that the outcome would leave his leftist movement with complete control of the country once the assembly takes charge.
“I said rain, thunder or lightning, the 30th of July was going to come,” the president said in a shaky video made from his vehicle after he cast his ballot.
But the powers of the new assembly members will be so vast that they could possibly remove Mr. Maduro from office, some analysts noted, ending a presidency that has been deeply unpopular, even among many leftists.
Many Venezuelans decided not to vote, as evidenced by short or no lines at polling places, dealing a serious blow to the popular legitimacy of Mr. Maduro’s effort.
Prosecutors said on Sunday that they were investigating the death of José Félix Pineda, a 39-year-old lawyer running for the constituent assembly. An armed group broke into Mr. Pineda’s home in the city of Ciudad Bolívar on Saturday night and shot him dead there, they said.
Hours later, a large explosion rocked a middle-class neighborhood in the Venezuelan capital, Caracas, injuring seven police officers on patrol there. Video circulated on social media showed the uniformed officers, all on motorcycles, riding into a fireball that had just erupted in front of them.
Nearby residents applauded as the security forces threw tear gas at them.
The unrest was the latest after three months of protests that have left more than 110 people dead, raising fears that Mr. Maduro’s efforts to consolidate power could steer the country toward deeper civil conflict.
The government took strong precautions to control Sunday’s vote. It outlawed protests in the days before and after, vowing tough sentences for those who disobeyed. And it barred many news outlets, including The New York Times, from entering polling stations to interview voters.
Those interviewed outside said they hoped the government would use the new powers of the constituent assembly to crush the opposition, whose control of the legislature has already been weakened this year by the courts, which are aligned with the Maduro government.
“The constituent assembly will be the power,” said Javier Granadillo, a 46-year-old mechanic who voted in Caracas and blamed the opposition for the country’s current crisis. “If any part of the government doesn’t do its job, they will be dissolved.”
Outside the fading public school building where he cast his ballot, Mr. Granadillo was joined on a sunny morning by several like-minded voters as some 20 people waited in line.
However, some polls leading up to Sunday’s voting showed that large majorities of Venezuelans did not think their country needed a new Constitution.
This month, Venezuelans issued a stinging rebuke to Mr. Maduro by turning out in droves during a symbolic vote held by the opposition. More than seven million votes were cast, opposition leaders said, with 98 percent against rewriting the Constitution.
The overhaul is also unpopular among some Latin American governments, with Colombia, Peru, Argentina and Panama indicating they would not accept the outcome.
President Trump threatened “swift economic actions” from the United States, which buys nearly half of Venezuela’s major export, oil, if Mr. Maduro went through with Sunday’s vote. Mr. Trump also praised the “strong, courageous actions” of the measure’s opposition.
But the outside encouragement seemed to do little to strengthen the opposition on Sunday. Leaders canceled a rally scheduled in the afternoon because of the clashes rocking the country. A demonstration on Friday, billed as a last stand against the vote, was poorly attended.
Instead, opposition members took to their social media accounts to drum up support.
“Today’s journey has been one of abstention and repression, with dead and wounded,” wrote Henrique Capriles, the opposition governor of the state of Miranda who narrowly lost to Mr. Maduro in 2013’s presidential election and was banned this year from running again. “A monumental failure!”
As the day wore on, government security forces used water cannons, rubber bullets and batons against opposition protesters, just as they have for the last three months.
Among those killed on Sunday were two boys, ages 13 and 17, who were shot dead during protests in the western state of Táchira; a police officer shot dead in front of a school; and a 43-year-old man killed in the central city of Barquisimeto in Lara State, when a bullet pierced his head, according to the state prosecutor’s office.
The focus of many voters in Caracas seemed to be on food, not politics. Venezuela remains in an economic tailspin, causing severe shortages of food and medicine.
“When the opposition got the National Assembly they said there would be food and now it’s even worse,” said Juan Carlos Hernández, 43, a government employee who said he supported Mr. Maduro.
“The first thing I’m asking of the constitutional assembly is that they start putting out food,” he said, “because if they don’t, the people are going to get angry.”
Powered by WPeMatico