CARACAS, Venezuela — The gunmen descended a street on Monday night toward a park taken over by student demonstrators in the western city of San Cristóbal, the crucible of the protests that have shaken Venezuela. They opened fire, and a 23-year-old student leader, Daniel Tinoco, fell. Hit in the upper body, he died before he got to a hospital, fellow protesters said.

Less than a week earlier, in Caracas, someone opened fire and killed a 25-year-old soldier, Acner López, who was riding on a motorcycle. Residents said he was in a group of soldiers shooting tear gas at demonstrators and apartment buildings. The shot that killed him, investigators believe, came from someone in one of the apartments.

These two deaths, among more than 20 that the government says are linked to over a month of protests, are emblematic of a spiral of violence that people on both sides of this country’s bitter political divide seem increasingly willing to accept.

“We don’t want dialogue if there are dead students,” said Christy Hernández, 21, a protester who saw Mr. Tinoco fall and went to find a car to take him to the hospital. She said demonstrators, many of whom want President Nicolás Maduro out of office, would keep up the pressure on the government despite the cost. “We already lit the fuse,” she said. “It’s now or never, and we’ve decided it should be now.”