A controversial alt-right political rally planned for San Francisco on Saturday afternoon has been canceled. Organizers announced the decision Friday afternoon, saying hostility from local politicians and leftist activists made the situation too dangerous. But concerns about protests on both sides linger, so the police remain on alert.Striking the right balance between free speech and public safety has become a challenge for local police departments, this year, as demonstrators show increasing willingness to confront one another, sometimes with violence.Sometimes the police are criticized for acting too quickly. That happened in Phoenix on Tuesday night, when police used to tear gas, flash-bangs and other methods to disperse a crowds who had come to protest against President Trump. "I myself was struck just above the eye by a pepperball round," says Ed Maguire, a criminology professor from Arizona State University who studies how police handle demonstrators.He says the Phoenix police had been pretty restrained — until violence by a few people caused them to shut the whole thing down. An overreaction, he says: It's better when cops target only the troublemakers."You're cutting off the actual people who are engaged in the destructive behavior, pulling them out of there and allowing the protest to go on, as the First Amendment allows for," Maguire says.But given the national shock over the recent violence in Charlottesville, Va., that left a woman dead, he says he knows police are feeling pressure to err on the side of caution. Seattle's former police chief, Norm Stamper, recalls the difficulty of balancing public safety with free speech."Part of it is a guessing game, and the best you can do under those circumstances, obviously, is to guess right," he says. Stamper says he guessed wrong back in 1999, during the anti-globalization protests that came to be known as the "battle in Seattle." He used tear gas to clear intersections, a move he now regrets, because he believes it muted the protesters' ability to express their opposition to the World Trade Organization. Still, Stamper says people should understand that police make these guesses — or "gambles," as he also calls them — often based on previous incidents, elsewhere in the country. "One of the things that police chiefs are contemplating these days, in their private moments, is the punchline," he says, "the way that the news media, for example, have summed up Charlottesville, Phoenix, Seattle. Then they're asking themselves what did they do, what did they not do, that led to this outcome?For instance, Phoenix police may have cracked down because police in Charlottesville were seen as too hands-off; but Charlottesville's restraint came after the cops there were criticized for being too heavy-handed at an earlier demonstration.One tactic that is quickly catching on is separation. When opposing political groups converge on the same place, police now do what they can to keep them apart. When alt-right groups held a small rally on Boston Common last Saturday, police used barricades to create a large buffer zone between them and the thousands of protesters who showed up in opposition.Joey Gibson has noticed the growing use of the tactic. He has been holding right-wing "Patriot Prayer" rallies up and down the West Coast for the last few months and is the organizer of the now-canceled rally near the Golden Gate Bridge in San Francisco. "I really don't want to see huge police lines separating us," Gibson says. His "free speech rallies" have attracted people with ideologies ranging from libertarianism to white pride, though he says he disavows racism and doesn't welcome those who identify as white nationalist, Ku Klux Klan or neo-Nazis. He says his main purpose is to fight for free speech for conservatives living in liberal enclaves, a goal he thinks is undermined when police use the separation tactic."If the police ... just keep everyone separated from the very beginning, it just turns into a yelling match and nothing gets resolved," he says.Gibson blames recent violence on small numbers of extremists who are looking for a fight, but he insists most demonstrators are still capable of meeting one another face to face and exchanging views peacefully. At the moment, though, local police departments aren't willing to take the chance. Copyright 2017 NPR. To see more, visit http://www.npr.org/.