Organizers of two right-wing rallies scheduled for this weekend in San Francisco and Berkeley abruptly called off their events Friday afternoon, after weeks of blowback from local residents and elected officials.

But questions remained about whether protesters would show up anyway, and some local leaders said they were still worried about violence. Neither San Francisco nor Berkeley scaled back their plans to deploy huge contingents of officers.

The surprise turnaround started at 3 p.m. Friday when Joey Gibson, the founder of the conservative group Patriot Prayer and the organizer of a rally scheduled for Saturday in San Francisco’s Crissy Field, used Facebook Live to announce that his event wouldn’t go forward. Gibson said that he believed that “tons of extremists” would be coming and that it could become dangerous.

“We’re not going to have a rally at Crissy Field,” Gibson said. “It doesn’t seem safe. A lot of people’s lives are going to be in danger tomorrow.”

Past events organized by the Portland-based Patriot Prayer have devolved into violence, suggesting that the organizers don’t necessarily have control over their followers.

A few hours later, the organizer of a “No to Marxism in America” rally scheduled for Sunday in Berkeley’s Civic Center Park said in a rambling statement to the media that her event was also off.

“I am asking the people to not attend this event Sunday,” wrote Amber Cummings, saying she was worried attendees would be attacked by counterprotesters. “I will be attending the event alone. I stress I DO NOT WANT ANYONE COMING.”

Berkeley officials said they were still preparing for protesters to show up Sunday. “We’re proceeding on the assumption that it’s still happening,” said Karina Ioffee, a spokeswoman for Mayor Jesse Arreguín. But, she quipped, “I’m hoping that the whole thing is canceled and everyone just goes to Six Flags.”

Both the San Francisco and Berkeley “free speech” rallies had attracted intense criticism since deadly violence broke out at a white nationalist protest in Charlottesville, Virginia, earlier this month. Local leaders such as House Minority Leader Nancy Pelosi and San Francisco Mayor Ed Lee denounced the events, saying they would bring neo-Nazis and other extremists to the Bay Area.

Gibson, who says he opposes racism and white nationalism, blamed Pelosi and Lee for unfairly characterizing his rally and attracting people with extreme views.

“After several conversations with the police and understanding the situation of what’s going on, we’ve decided that tomorrow really seems like a setup,” Gibson said. “We decided to go ahead and take the opportunity to not fall into that trap.”

He and other Patriot Prayer leaders said they would hold a news conference Saturday at 2 p.m. in San Francisco’s Alamo Square Park. But state Sen. Scott Wiener, who represents San Francisco, said in a tweet that the news conference would be “illegal as they have no permit.”

Extremists say that instead of Crissy Field, they're holding "press conference" Sat. @ Alamo Square. This is illegal as they have no permit. — Scott Wiener (@Scott_Wiener) August 25, 2017

Brian Levin, a criminology professor at Cal State San Bernardino who studies hate groups, said he thought the Alamo news conference could be a ploy to simply move the San Francisco rally across town. While the Crissy Field rally had faced a long list of restrictions from the National Parks Service — no weapons, no mace, no helmets or face masks — those rules wouldn’t apply on San Francisco streets.

Alamo Square Park is also in the center of a residential neighborhood and much closer to a large counterprotest organized by city officials at Civic Center Plaza, which could increase the chances of confrontation.

The rally had led to massive preparations by San Francisco officials and police. Nearly every San Francisco police officer was scheduled to be on duty Saturday, and officials at Crissy Field had already set up an extensive network of fencing aimed at separating groups of protesters.

Lee announced on Twitter late Friday that all of the city’s officers would still be on the job.

We want to thank our public safety professionals, all of whom will be working tomorrow. pic.twitter.com/7VFhMOOI7z — Mayor Ed Lee (@mayoredlee) August 26, 2017

In a statement, Pelosi heralded the cancellation of the Crissy Field rally. “Reason has prevailed because the people of San Francisco have demonstrated our determination to protect the freedom of peaceful expression as well as public safety,” she said.

George Holland, the president of the Oakland chapter of the NAACP, said he thought canceling the rallies was “a good move.”

“If you believe in your cause, you don’t need to confront these people,” he said. White nationalists, he said, “don’t get any exposure unless it’s violent, and if they don’t get any exposure, they would probably disappear.”

Bay Area residents had planned multiple counterprotests in San Francisco, Oakland and Berkeley over the weekend. The announcement of the cancellations came just hours after a “unite against hate” rally in San Francisco’s Civic Center Plaza.

As the Crissy Field organizers signed off their Facebook live feed announcing the decision, a woman could be heard in the background calling out in a sing-song voice: “Plot twist!”

Staff writer Thomas Peele contributed to this report.