As tents and Occupy D.C. protesters filled two federal parks in the District in early November, a homeland security “bulletin” was sent to dozens of local law-enforcement officials.

Authorities in Arizona had discovered an article titled “When Should You Shoot A Cop” at an Occupy Phoenix encampment, the notice warned.

U.S. Park Police Capt. Kathleen Harasek, commander of D.C.'s Central District, wrote to senior agency officials: “We need to remember that just because we didn’t find the same article here, doesn’t mean the sentiment doesn’t exist among our group.”

The e-mail, revealed in documents obtained by The Washington Post under the Freedom of Information Act, sparked concern about the possibility of a kind of violence that never materialized. There were no reported shootings aimed at police at an Occupy protest locally or nationally, and the vast majority of them remained peaceful.

But the message set the stage for the unpredictable and tense relationship that has existed between some protesters and police in the District throughout the nearly five-month protest.

An examination of the local police response to the movement offers a glimpse at the challenges facing officers as they monitor a round-the-clock protest in an electronic age that allows the world to watch in real time via the Internet.

As police in other cities moved in quickly to shut down camps in the early weeks of the Occupy Wall Street movement, officers clashed with protesters in some well-publicized episodes of violence. But for months, the Park Police here, aware of the international spotlight, largely held back. There were some heated exchanges as small bands of troublemakers fed off the hostility between protesters and police elsewhere.

More than a half-dozen officers allegedly were assaulted during the past two months, including one who was reportedly struck in the head with a bottle when Park Police swept through McPherson Square and Freedom Plaza on Feb. 4 and 5 to enforce an anti-camping ban. Online videos show police standing stone-faced as some Occupiers in the District called them wife beaters, “scum” and yelled other insults. Protesters also uploaded profanity-laced videos on YouTube, showing officers’ faces and badge numbers.

William J. Johnson, executive director of the National Association of Police Organizations, said taunts from protesters come with the job in the nation’s capital.

“Realistically, they are not going to march into Congress and spit on a congressman or throw urine at a senator,” Johnson said. “It’s the individual officer that is really the face of the government or the tangible government presence during a protest.”

Occupy D.C. protesters say their mistrust of police can be traced to allegations of police brutality this year, including the use of pepper spray on students at the University of California at Davis. Locally, they point to videos of Park Police swinging batons, trying to push people away from McPherson Square three weeks ago.

“I’ve called them pigs, because they can be pigs,” said Ryan Lash, 25, who was arrested and subdued with a police Taser gun in McPherson Square last month. “There is sometimes a lot of anger, especially when we see violence against fellow protesters.”

District Police Chief Cathy Lanier said that only a few of the protesters seem to target the police, but “they are the worst. They taunt, they get in officers’ faces, they throw urine. They want to be treated with respect, but they don’t treat us with respect.”

On Dec. 22, a Park Police officer was kicked in the groin and another in the chest when they attempted to make an arrest in McPherson Square, according to court documents.

Three weeks later, when Park Police moved to enforce the no-camping ban at McPherson Square, an officer was taken to the hospital with minor injuries, after a suspect threw a “3 to 4 foot” bamboo stick at him, according to police reports.

The suspect, Nathan J. Gorecki, has been charged with assaulting an officer. He denies the charge. Gorecki said police broke his elbow, ribs and fractured his skull when they tackled him during the arrest, but Park Police said they were unable to confirm the extent of his injuries.

On the same day, another officer received “significant bodily injuries” after Jeremiah DeSousa allegedly threw a bottle at him. DeSousa was charged with assaulting a police officer. He also denies the charges, according to court documents.

Park Service e-mails and documents show that on Oct. 19, three weeks after the first protest began, officials were worried about the potential for violence. Leaders of the Downtown Business Improvement District wrote Park Service officials to warn that protesters were “stacking lumber” possibly to use as “weapons against law enforcement,” a concern that turned out to be unfounded.

A month later senior Park Service also appeared to be extra cautious when they asked District Police not to go into McPherson Square one night because the police presence might “escalate the tenuous relationship” between the two sides, according to e-mails.

Though some of the tension has subsided, police are concerned that a new wave of protesters from other states could again test no-camping rules in downtown parks.

But Sam Jewler, a protest organizer from the District, said protesters have turned their focus to building community support, including new actions aimed at foreclosure prevention, and he said he expects fewer skirmishes with police.

“Things happened in the park, but I don’t think it should reflect equally on the movement,” Jewler said, adding that some of the out-of-town troublemakers have left. “It’s a public park, and there were some people we didn’t know how to deal with.”

But the uneasy relationship remains.

Protesters and police got into a shoving match Feb. 10 outside of the Conservative Political Action Conference in Woodley Park, resulting in both police and protesters landing on the ground. When an officer on horseback tried to push a protester away from the scene, the young man hurled obscenities and tried to block the horse, setting up a daring game of chicken between him and the 1,200-pound animal.

“I would listen if they were nicer,” said the protester, who identified himself as Nate. “They are trying to taunt me into doing something. Would you be pushed around and just stand there?”

Kenneth Eisold, a New York-based psychoanalyst who has written about Occupy Wall Street, said some protesters appear to be lashing out because their grievances, which include bridging the economic divide between the rich and the poor, have yet to be addressed. Many protesters, he said, do not realize it took years for 1960s protesters to see some progress during the civil rights and anti-war era.

“They can’t occupy the external spaces anymore and they themselves don’t know where to go from this point, so the frustration leads to outbursts,” Eisold said. “They get angry at the police because they need to ventilate in some ways.”

Lt. Robert T. Glover of the District Police Department’s Special Operations Bureau said the agency will continue trying to communicate and work with the protesters to defuse potential problems before injury or arrests. Glover spent a week on medical leave after spraining his wrist during the scuffle outside the Woodley Park conference.

“I believe that officers are aware of the previous assaults on officers, and that awareness has led to even better de-escalation techniques,” he said.

Read more from The Washington Post:

Family seeks justice in ‘friendly fire’ death

Fairfax man cited in security report

Teen injured during dispute at Metro Center

After decades, Ego Brown still takes a shine to shoes