CARACAS, Venezuela—President Nicolás Maduro has lost support among the legions of poor Venezuelans that once backed the late Hugo Chávez, but they have largely shown little interest in joining the opposition-led protests that have convulsed the country the past three weeks.

Many of the impoverished residents of the vast slums that ring Caracas and other major cities are angry about a collapsing economy and food shortages. But Venezuela’s political unrest remains mostly confined to middle-class enclaves, underscoring the struggle the opposition here faces in trying to unseat an increasingly authoritarian government.

Read: Venezuela antigovernment protests turn deadly

“All I have is hunger—I don’t care if the people protest or not,” said laborer Alfonzo Molero in a slum in Venezuela’s second-largest city, Maracaibo. “With what strength will I protest if my stomach is empty since yesterday?”

Until the slums rise up, Maduro will likely hang on, analysts say.

“The discontent in the poor sectors is not being channeled through the opposition,” said Alejandro Velasco, a history professor at New York University and the author of a book on Venezuelan slums.

In three weeks of unrest, seven protesters have been killed and hundreds have been jailed. The government has used tactics such as lobbing tear gas from helicopters to disperse opposition crowds, efforts aided by pro-government gangs often armed with weapons and clubs.

More than four in five Venezuelans say they don’t earn enough to meet basic needs and three-quarters say they have lost an average of 19 pounds of weight last year, according to the Encovi survey by Venezuela’s top three universities.

An expanded version of this article appears on WSJ.com.

Popular on WSJ.com:

Fox Is Preparing to Cut Ties With Bill O’Reilly

Exxon Seeks U.S. Waiver to Resume Russia Oil Venture