CARACAS, Venezuela — Chanting “We are not afraid,” thousands of Venezuelans took to the streets Saturday in the largest anti-government demonstration in months, marking a bid by the opposition to reinvigorate the movement against President Nicolás Maduro after a string of popular uprisings across South America.

The protests did not appear to match the gargantuan anti-Maduro protests earlier this year, but still amounted to a major uptick from the smaller-scale protests of recent months.

In some quarters of the capital, protesters confronted police firing tear gas. But demonstrators said they felt inspired by the uprising in Bolivia last week that saw a divided opposition unite, win the backing of the military and force the resignation of former president Evo Morales, a staunch ally of Maduro.

Massive demonstrations in recent weeks have also triggered landmark policy shifts by governments in Chile and Ecuador.

“Venezuelans should not think about a leader or a party, but about being united,” said Victor Hugo Rodriguez, a 20-year-old law student in the crowd in Caracas. “If Bolivians achieved it, we can achieve it, too.”

Called by opposition leader Juan Guaidó, who is recognized as Venezuela’s legitimate leader by more than 55 nations including the United States, the anti-Maduro protests unfolded across Venezuela. Organizers also mounted smaller, parallel protests in the United States and Europe.

“Today we return victorious, because we are in the streets and we will stay until we achieve our goal,” Guaidó told the crowd, adding that he had spoken with Bolivia’s self-declared interim president, Jeanine Áñez, earlier and was also celebrating that nation’s “transition toward democracy and liberty.”

“Those who decided to join in know that this depends on everyone,” Guaidó told reporters. “Just like what happened in Bolivia.”

A relatively smaller counter-rally in central Caracas was called in support of Maduro’s socialist government.

In what appeared to be a preemptive warning from the government, masked special forces raided the headquarters of a major opposition party, Voluntad Popular, or Popular Will, on the eve of the protests.

“I reiterate my call to the military and police forces to be on maximum alert, for moral discipline and subordination,” Maduro said in a nationally televised speech this past week, adding: “Zero tolerance for terrorism!”

Venezuela — a failed state plagued by widespread hunger and ruled by a repressive government alleged to have manipulated last year’s election — is facing a more dire crisis than any of its neighbors. Nevertheless, Maduro, a 56-year old former union leader and the political heir of the late leftist Hugo Chávez, has proved more durable than his opposition initially calculated.

In January, after the opposition-controlled National Assembly named Guaidó as interim leader, the 36-year-old industrial engineer united the opposition, stirring hundreds of thousands of Venezuelans to take to the streets. But those large-scale protests began to recede after an opposition conspiracy with Maduro allies failed to oust him on April 30, and polls show support for Guaidó has ebbed in recent months.

“We have committed errors, and I ask the Venezuelan people for forgiveness,” Guaidó told supporters.

Yet Venezuelans have never really stopped protesting, turning out for multiple smaller demonstrations, including many railing against the government over the broken power and water grids. According to the Venezuelan Observatory of Social Conflict, there have been 14,330 protests this year, mostly to demand economic improvements and better services such as water and electricity.

Few, however, believe that street protests alone will successfully pressure Maduro to leave.

Painful U.S. sanctions — including an embargo on Venezuelan oil — have damaged a Venezuelan economy already on life support. But they have also failed to oust Maduro.

At the same time, hopes for a negotiated solution have dimmed as talks between the opposition and Maduro’s government, brokered by Norway, have broken down.

After three rounds of talks, Maduro’s negotiators withdrew in August in response to another round of U.S. sanctions. In a letter requesting a tougher line on Maduro from European leaders this month, Guaidó outlined the gist of the opposition’s position.

According to a copy of the letter obtained by The Washington Post, the opposition offered a deal in which both Guaidó and Maduro would step down, and a “State Council” made up of government, opposition and military representatives would lead the nation to new elections.

The pro-Maduro electoral council would be revamped to guarantee a fair vote, political prisoners would be released and foreign humanitarian aid allowed in.

Several people familiar with the talks say that Maduro’s negotiators never accepted that full battery of demands. But the government has offered new presidential elections within one year in return for an easing of U.S. sanctions. The details of that deal — including whether Maduro would step down — remained to be worked out.

Stung by U.S. sanctions, the Maduro government is now pushing to reopen talks.

But the opposition has resisted, citing distrust of the government’s intentions and insisting that Maduro must first respond to the offer already on the table. The government has since entered into talks with smaller opposition parties, seeking to divide and conquer the grass-roots movement against it.

In the meantime, millions of Venezuelans continue to face near-starvation-level conditions.

“We are in a catastrophic tie,” said Stalin González, an opposition negotiator at the talks.

“I think the negotiations reached the limit that the government wanted them to reach,” he said. “The regime believes that the worst has already passed, and that they can now continue in power and let more time pass. . . . They think they can survive this.”

The stakes are high for Guaidó’s effort to re-energize the opposition. Since February, polls have shown a sharp decrease in the number of Venezuelans who believe the opposition’s fight will bring change.

As some Venezuelans have watched the events in Bolivia unfold, many have wondered why, despite protests, sanctions and negotiations, Maduro hasn’t suffered Morales’s fate.

Analysts point to key some differences. Venezuela’s government is more openly autocratic, controlling institutions — including the military — to a much higher degree. It has also been more disposed to use lethal force. Venezuela’s often-divided opposition has also made what observers describe as bad strategic choices over the past years and months.

“If there’s a lesson from Bolivia, it’s that nothing can be done without the armed forces,” said Luis Vicente León, director of Caracas-based Datanalisis, a polling firm. “Yet the military here is so much a part of the government, that it sees Maduro as a guarantee of survival.”

Demonstrators, however, insisted Saturday’s protests signal a new chapter in their struggle.

“Everyday, I open my eyes in the morning and see people struggling to survive in Venezuela,” said Odalys Medina, 54, a retired teacher who joined the protests in eastern Caracas.

“I think these protests will keep going,” she said. “Caracas lacks motivation and will, but I think we’ll come out again, despite the fear.”

Faiola and Krygier reported from Miami.