Pedestrians walk near posters showing Venezuela's late president Hugo Chávez calling people to vote for the pro-government parties in Caracas. Voters head to the polls Sunday. (Ariana Cubillos/AP)

Beset by an unraveling economy and spiking violence, Venezuela’s longtime ruling party could suffer its first major electoral loss Sunday, dealing a harsh setback to an anti-American leftist movement that had gained favor over the past decade across a wide arc of South America.

Sixteen years into the “revolution” started by Hugo Chávez and now led by Nicolás Maduro, a rising opposition is challenging not just the people who sit in the National Assembly but also the political direction of the continent’s largest oil-producing country. The prospect of change has put the country on edge, with many fearing civil unrest.

At the governing party’s closing rally in Caracas, red-clad Chavistas filled Avenida Bolivar, one of the capital’s main streets, under the outstretched arms of a giant inflatable Hugo Chávez doll. Maduro, who has called Sunday’s election a “date with history,” parted the crowd, waving from his red armored truck, as he passed in front of a public housing project built by Chávez.

“I think the best poll is this,” said Alberto Pérez, a 62-year-old retired teacher, motioning to the crowd celebrating around him Thursday. “Chávez is in every one of our hearts. He lives. With Chávez, Maduro wins, and the people win.”

That street-level adoration was enough to sweep Maduro into power after Chávez’s death two years ago, when the onetime bus driver was elected to his current six-year term. But it might not be enough to ensure Maduro’s continued control of the legislature.

The ruling United Socialist Party of Venezuela controls 60 percent of the National Assembly, a unicameral body that has served, until now, mostly as the president’s rubber stamp. But Maduro has nowhere near Chávez’s charisma or popularity. His approval ratings have dropped to the low 20-percent range. Polls indicate that the opposition coalition, known as the Democratic Unity Roundtable, could win a solid majority of the assembly’s 167 seats.

“The opposition in this moment has an advantage in total votes, statistically, that shows a clear majority,” Luis Vicente León, director of Datanalisis, a polling firm, said Friday. “The majority of the people who are going to vote for the opposition aren’t with the opposition. They are against Maduro. This is a punishment vote. It’s rage about the economic situation.”

That “situation” is the worst economic crisis in Venezuela’s modern history. Oil prices in this petroleum-exporting nation have plunged. Thousands of private companies have closed, with many owners blaming the government’s economic mismanagement. The economy is set to contract by about 10 percent this year. Prices are erratic, with four competing exchange rates and the world’s highest inflation. The government has hiked wages at least five times in the past two years to try to keep pace. Many who can afford it have fled the country.

Across Caracas, people wait in lines for hours to withdraw increasingly worthless currency from cash machines. There are lines for supermarkets, appliance shops and toy stores. Customers enter often find empty shelves. Staples such as rice, eggs and meat are increasingly scarce. Hardware stores are short on cleaning supplies. Cafes don’t have coffee cups. Pharmacies lack antibiotics and birth-control pills.

“Where are we? What country are we in? What planet are we on?” asked William Rodriguez, a 62-year-old bread shop retiree and the 30th person waiting in line to get his pension at the Banco Fondo Común. “How can it be that we have to wait for three hours to buy four rolls of toilet paper? My God.”

Behind Rodriguez were other representatives of the outraged middle class, people who had spent their lives accustomed to certain standards that have vanished. Residents say they rarely leave their homes at night, afraid of robberies or worse. (Venezuela has the world’s second-highest murder rate.) There have been no classes at most of the country’s public universities since September, because of a teachers strike.

Lilian Ross, 78, had been a researcher at Proctor and Gamble in Venezuela and can recall the presidents back to Marcos Pérez Jiménez in the 1950s.

“We have had bad ones.Then we’ve had some really bad ones,” she said. “But we’ve never had to line up to buy food.”

Maduro’s strong fight

Government opponents hope that public frustration is high enough to push the Chávez movement from power, but Maduro is putting up a strong fight. He has campaigned on behalf of Chavista candidates and has mobilized his party’s political patronage machine. Government buses ferry protesters to rallies. Red-vested public officials visit businesses, encouraging shopkeepers to vote. As opponents see it, Maduro encourages a climate of fear and intimidation.

“Imagine if they dominated the National Assembly,” Maduro said in a speech in the run-up to the vote. “I wouldn’t allow it, I swear. I wouldn’t let my hands be tied by anyone. I’d take to the street with the people.”

Last month, an opposition politician was shot and killed after a campaign event in the central state of Guarico. The government denied involvement, saying the killed politician was involved in a gang dispute. Other candidates also have been attacked and threatened. Many prominent international observers, such as the Organization of American States, have been blocked from monitoring the elections.

Maduro’s supporters see the answer to the spiraling economic woes as a deepening of socialism and state control. They accuse the opposition of waging an “economic war” to benefit the pro-American elite and to sabotage Venezuela.

“They say we’re peasants, that we’re evil, that we’re ignorant,” said Hilda León, a 59-year-old environmental studies professor, who wore a red T-shirt emblazoned with Chávez’s eyes. “We are giving more benefits to the people who have always been excluded.”

“They don’t have any proposals,” she added. “They have absolutely nothing.”

This is a criticism that worries the opposition, too. Its members say that they haven’t succeeded in uniting around a common vision on how to govern, beyond confronting Maduro.

An opposition victory wouldn’t mean a government collapse or the end of Venezuelan-style socialism. But it could bring tangible change. Opponents say that, with a majority, they could propose impeachment, revoke Maduro’s decree powers or free prisoners who appear to have been jailed for their political views, including the prominent opposition politician Leopoldo López.

“The political situation in Venezuela has already changed. What we’re looking for is that it gets expressed. And we hope that happens Sunday,” said opposition leader Henrique Capriles, the governor of Miranda, a state that includes part of Caracas. “This new National Assembly is going to be a mirror showing the new political reality in this country.”

Read more:

On Venezuela’s communes, idyllic future is just over the rainbow

Venezuelan opposition leader sentenced to military prison

Venezuela is basically bankrupt again

Today's coverage from Post correspondents around the world