“If you speak bad of Maduro, you will be jailed,” she warned, referring to the President Nicolás Maduro.

Unable to reach the presidential palace, which has been cordoned off, many Venezuelans have vented their outrage at the police officers containing them in streets, throwing homemade bombs and feces at the security services. At least one officer and a National Guardsman have been killed, the authorities say.

The scenes of repression from the police and military have been stark as well. As protesters demand food and new elections, stone-faced police officers have dragged them across the pavement or chased them into a dirty canal with the sting of tear gas. More than 40 people have died in the clashes in recent weeks.

Yet there are moments when the two sides have seemed closer. On the side of a building one night, as shots were heard in the capital and people in high-rises banged on pots and pans to protest the president, someone projected a message on a wall directed at the National Guard. “Guardsmen,” it said, “are you not hungry?”

The pain has been growing in Venezuela for more than two years as it reels from its worst economic crisis in generations. Hundreds of thousands have taken to the streets to demand the ouster of Mr. Maduro, and clashes between protesters and the state have continued for weeks.

The United States raised the crisis at the United Nations Security Council on Wednesday, despite Venezuela’s objection that it was an internal matter. Ambassador Nikki R. Haley of the United States said that if left unaddressed, Venezuela’s crisis would escalate into a “world problem,” as had the crises that afflicted countries like Syria and South Sudan.

The United States took no sides in Venezuela, Ms. Haley insisted, but she called on Mr. Maduro to “show respect for the Venezuelan people” and their constitutional rights. “Suddenly, you’re arresting protesters, we’re seeing deaths happen, we’re seeing political prisoners,” she said. “That’s not the way to respect your people.”