As violent protests became almost routine the last two years in Portland, the officer overseeing the police crowd control team worked almost full-time reaching out to protest leaders to decide how police should plan and staff the demonstrations.

Lt. Jeffrey Niiya exchanged hundreds of texts and emails with Joey Gibson, the outspoken leader of Patriot Prayer, as the right-wing group ventured into Portland to stage rallies that drew counter-protesters and often devolved into bloody brawls.

Disclosure of the messages and rapport between Niiya and Gibson ignited a firestorm in the past several days.

City Commissioner Jo Ann Hardesty, followed by Mayor Ted Wheeler, and community activists reacted with outrage. They jumped on the cozy communications as evidence of their long-standing fears that police have colluded with ultra-conservative demonstrators and targeted leftist opponents.

The heated flap shines a light on the challenge police face, law enforcement specialists say: While police gather information to keep the peace on city streets, as their policies direct, they’re also expected to maintain a fair playing field for dueling demonstrators.

“If there’s one thing we learned from Charlottesville, you have to connect with demonstrators from both sides,’’ said Chuck Wexler, executive director of the Police Executive Research Forum, a nonprofit police policy organization. “Not to do that is a recipe for disaster.”

In 2017, police in Charlottesville, Va., were ill-prepared for the white nationalist Unite the Right rally that left dozens injured and one counter-protester dead.

“You can’t just pick and choose which demonstrators you like,’’ Wexler said.

The confiding tone of Niiya’s emails and texts could be taken as preferential treatment to people not familiar with police technique, said Erroll G. Southers, a national security professor at the University of Southern California.

“I can understand how it looks to the oppositional groups. Don’t get me wrong, the optics are not real good,’’ said Southers, a former FBI agent. “As soon as you appear to show some sort of favoritism or allegiance with an extremist group that can become a problem.’’

But it’s common to be conversational and work to establish a relationship, he said.

CROWD CONTROL POLICY

It’s not the first time communications by Niiya, a 22-year police veteran who has been the bureau’s liaison with demonstrators since Occupy Portland in 2011, have sparked controversy.

Two years ago, his emails and text messages with a member active in left-leaning protests, June Davies, became public. Then, critics accused Davies, known as “Gia,’’ of being an informant for the police.

Their text exchanges spanned months, often discussing police presence at protests, how activists might respond and Davies inquiring if certain people were arrested during marches and Niiya providing what information he could.

Since then, Niiya has continued to make overtures with self-described anti-fascist demonstrators and their allies but has had less success as a result, said Lt. Craig Morgan, president of the Portland Police Commanding Officers Association, the union that represents lieutenants.

Morgan said counter-demonstrators often have been less organized or without a clear leader and some don’t recognize police authority. They have been less inclined to talk to officers before or during a protest, he said.

“Obviously Joey Gibson was willing to engage in a dialogue and quite frankly, willing to provide information to us,’’ Morgan said. “We were getting valuable information to help us shape our responses and keep Portland safe.

“You can second-guess the friendly tone but the reality is it’s done to build rapport with people to get information out of them for public safety. That’s a time-tested technique. Niiya has tried to do it with people from all sides.’’

The Police Bureau’s policy on crowd control directs officers to “make reasonable efforts to contact and engage in dialogue with known event or demonstration organizers.” That’s done to plan and to “develop a shared understanding of the organizers’ needs and objectives,’’ according to the policy.

The bureau also should communicate its expectations and tell participants what’s allowed or restricted during a protest, it says.

Officers who are liaisons are encouraged to maintain contact with organizers before and during the events and to interact with crowds in non-confrontational ways, the policy advises.

But police, while doing that, must avoid providing any suggestion or perception that they’re backing one group over another, said Brian Levin, a former New York City police officer and now director of California State University's Center for the Study of Hate and Extremism.

“Police are in a difficult position trying to maintain some type of communication to forestall violence,” Levin said. “Police work requires that there be communication with folks that ain’t choir boys.”

Gibson, who lives in Washington, has become a particularly polarizing figure on the Portland protest scene, drawing people espousing hateful views to his gatherings – including right-wing supporters from out of town known for clashing with antifa activists. Despite the mayor’s attempts to derail it, he held a rally in Portland in June 2017, shortly after a man was accused of fatally stabbing two good Samaritans and wounding a third on a MAX train who had tried to stop his racist rant. The alleged killer had attended one of Gibson’s past rallies, though Gibson subsequently denounced him.

Niiya’s texts and emails with Gibson show him sometimes telling Gibson about the movements of counter-protesters, telling Gibson if officers will be on foot or bike at protests, even warning Gibson about an arrest warrant for one of his devoted followers.

“The problem is, even if the intentions here weren’t malicious, the perception can damage the police-community relationship significantly,’’ Levin said.

Wexler added that if demonstrators on one side don’t want to talk to police, “you keep trying. You do the best you can. You try to talk to as many demonstrators on as many sides as you can’’ or friends of friends.

CAN’T AID AND ABET

It’s important for Niiya to have shared his communications and information he got from Gibson with command staff, said the USC’s Southers, also the author of the book "Homegrown Violent Extremism.''

According to the material released, Niiya often alerted the police chief, an assistant police chief and others, including the mayor’s office, about details gleaned from Gibson. At one point, the communications referenced a meeting that police, Gibson and Wheeler had before the June 2017 protest.

It’s appropriate to find out a protest group’s plans, the number of people expected at a march, and who’s expected to show, Southers said.

Niiya’s suggestion to Gibson during one protest that Gibson may want to move his group because counter-protesters were headed his way also was appropriate to reduce the potential for violence, Southers said.

Even Niiya’s hearty congratulations to Gibson upon learning he was running for U.S. Senate -- “personally I don’t have a problem with that,’’ he said.

What would be unacceptable, he said, is police “willing to aid and abet’’ or fraternizing with an extremist organization.

Gibson’s remark in one message to Niiya, when Gibson apologized, noting "I accidentally said portland police has our back. It slipped,'' is the kind of remark that can be explosive, the experts said.

‘HE WAS THE SAME WITH ALL GROUPS’

The texts and emails give a one-sided view of how crowd control preparations work, said former Portland Deputy City Attorney Jason Loos, who was legal adviser to the Police Bureau from 2016 through 2018 and worked nearly every protest during that time.

Loos said he found Niiya to be professional and courteous to all sides.

“There seems to be a lot of criticism because Sergeant Niiya was ‘friendly,’” Loos said. “I can guarantee you he was the same with all groups.’’

Niiya’s alert to Gibson on the night of Dec. 8, 2017, and again the next day, on Dec. 9, 2017, about his supporter’s arrest warrant just before one protest made tactical sense, Loos said. Niiya advised Gibson that Tusitala John “Tiny” Toese, also a member of the far-right Proud Boys, had a disorderly conduct warrant in Portland and suggested that it be taken care of before Toese came to the city. Niiya also said officers could arrest Toese if he acted out but it wasn’t likely to occur.

“It is trying to avoid a flashpoint,” Loos said. “It is in no way allowing them to evade arrest. It is trying to avoid having them arrested in the middle of a demonstration.’’

Police did end up arresting Toese during a protest on Dec. 9, 2017, accusing him of additional allegations of attempted fourth-degree assault, harassment and second-degree disorderly conduct, in addition to the prior disorderly conduct warrant he faced, court records show.

Morgan, the union president, said there’s a “sense of frustration’’ that the mayor condemned Niiya’s actions before an internal investigation began.

“It feels like he’s already got his mind made up,’’ Morgan said.

Now, it’s important for the Police Bureau to repair the break in the community’s trust, the experts all agreed.

“It can be a catalyst for division or a catalyst for positive change,’’ Levin said.

The bureau must do a full investigation and make it public when it’s done, they said.

Going forward, police need to ensure their text messages, emails and social media posts don’t “look overly chummy’’ with either group of protesters, Levin said. Police also must continue to broadcast parameters set for future protests before an event and enforce them evenly “without respect to ideology,’’ he said.

Gibson on Friday said his contacts with Niiya were no different from Davis, the left-leaning protester.

“Anytime I wasn’t coming into Portland, Niiya was happy,’’ Gibson said. “It’s funny to watch everyone’s reaction because he was doing his job.’’

Niiya himself wrote to Gibson last October: “It’s a tough job and trying to weigh everything to come out with everyone safe and happy. Probably will never happen but we try. And I try to do the best I can to communicate to you and the others on the other side who will listen to me.’’

Sample HTML block

-- Maxine Bernstein

Email at mbernstein@oregonian.com

Follow on Twitter @maxoregonian

Visit subscription.oregonlive.com/newsletters to get Oregonian/OregonLive journalism delivered to your email inbox.