Baton Rouge residents have been rocked by the shooting deaths of police officers in their city. But they remain hopeful that people can find common ground and move forward from tragedy. (Daron Taylor,Ashleigh Joplin/The Washington Post)

BATON ROUGE — The Albertsons employee gazed across the street at the B-Quik mart where, just 24 hours before, he saw two police officers and a sheriff’s deputy killed before his eyes. Sweat beaded on his forehead, which was lined with worry.

“It had a movie feel to it,” said the employee, who asked not to be named because it could jeopardize his job. The chaos, the crackle of gunfire, the shouts of “officer down” — it might have been a Hollywood battle scene.

He had seen gunfire before. He lived in Baton Rouge, after all. Guns could be quickly acquired from the sporting goods store down the interstate. Bullets, it sometimes seemed, were expended just as easily.

But this was different. These were police, crouching behind cars in tactical gear. In stunned, scared silence, he and his colleagues hunkered down for eight hours, until an official told them it was finally safe to leave.

“There’s a lot going on right now,” he said. “After everything that’s happening — Orlando, Dallas, what happened in France. Alton Sterling. Philando Castile. It’s all over the place.”

What’s all over the place?

“Murder,” he said.

The shootout, which left three law enforcement officers dead and three wounded, came on the heels of the police shootings of Sterling in Baton Rouge and Castile in Minnesota, and the slaying of five Dallas police officers at the hands of a gunman who said he wanted to take revenge. And all of it is happening against a backdrop of a rancorous presidential campaign and a spike in global terror.

To Chastity Massey, who was paying her respects at a makeshift memorial to Sterling, it’s like “a whole war” has started.

Indeed, the past two weeks have had some chilling echoes of battle. Officers turned out in body armor and gas masks to disperse demonstrations over Sterling’s death. Last week, authorities announced that they’d arrested a group of men stealing guns from a pawn shop, allegedly so they could kill police. In Louisiana, an open carry state, anyone — white, black, officer, civilian — has a right to be armed.

On Monday, Baton Rouge police chief Carl Dabadie defended his department’s “militarized” tactics in recent weeks, saying that the recent killings show “we are up against a force that is not always playing by the rules.”

The gunmen who fired on police were trained and armed for something more like war. Micah Johnson, who killed five officers in Dallas two weeks ago, served in Afghanistan and studied “shoot and move combat,” authorities said. Gavin Long, who has been identified in Sunday’s shooting, had served five years in the Marines.

Many of those killed were also veterans, including Matthew Gerald, an Army and Marine Corps veteran who had served three tours in Iraq as part of a Black Hawk helicopter crew. And the work that police do, East Baton Rouge Sheriff Sid Gautreaux said, requires as much courage as battle.

“They are heroes,” he said at a news conference Monday. “Just like the men and women who put on a uniform every morning and every night. I ask the community to keep them and their families in their prayers, and I ask this community to pray for peace. We will be get through this. Baton Rouge is better than this.”

But as in war, the bloodshed has a way of driving people into their corners.

Will Bailey, who lives about a mile away from the B-Quik where the officers were killed, had just started his daily shift as an Uber driver when he heard the news of a gunfight. He immediately turned to go home, and texted his adult sons to do the same.

“I’m worried it’s going to be open season now because a black guy shot some police officers,” he said.

Bailey moved to Baton Rouge from New Orleans 11 years ago, a refugee of Hurricane Katrina. He built a new life in the city — his young son is a law student at Louisiana State University, his daughter just graduated from high school.

But in times like these, that life feels tenuous. As a black man, Bailey said he has experienced first hand how easily an encounter with a police officer can go wrong. He also worries about people in town who might decide to take revenge on behalf of the slain police officers, much the same way Long and Johnson claimed they were taking revenge on behalf of those killed by police.

“Yesterday, I saw four white guys in a pickup, looking at me across the intersection, looking as if they were hunting something,” Bailey said. He admits he doesn’t know anything about what they were doing. But it was enough to make him nervous.

“Maybe I didn’t need to feel that way. But that’s the feeling I got,” he said. “Everyone is on high alert now. It’s a powder keg.”

Baton Rouge’s racial tensions run deep. In 1953, civil rights activists in the city organized a bus boycott that provided the template for the boycott in Montgomery, Ala. The city is still under a 1980 federal consent decree to diversify its police force, which is mostly white in a city that is mostly black. Now the Justice Department is investigating the shooting that killed Sterling.

“Everybody feels like they have to pick sides,” the Albertsons employee said. “Cops against the community, community against cops. It seems like there’s a standoff between the two groups.”

The Albertsons employee is black, and has a biracial daughter. She is 4 years old.

“When I thinking about raising my child in this —”

He shakes his head. “I’m very disturbed.”

No one understood this better than Montrell Jackson, a black Baton Rouge police officer who was one of the three slain Sunday. He toed the divide between community and cops during his 10-year tenure on the force.

In a Facebook post that went viral after his death, Jackson wrote: “I swear to God I love this city but I wonder if this city loves me.”

“In uniform I get nasty hateful looks,” he continued, “and out of uniform some consider me a threat.”

After Jackson and his two colleagues were killed Sunday, there was a feeling that something had to give.

“Until we come together as a nation, as a people — to heal, as a people — if we don’t do that and this madness continues, we will surely perish as a people,” Gatreaux said.

Clergy from a diverse array of churches scrambled to organize a vigil for the slain officers Wednesday night.

“There’s always been this separation,” pastor Joseph Moore said. “I’m praying this will help. They can hear our heart. We can hear their heart.”

And parents — gripped by the same fear as the Albertsons employee, that their children will grow up in a city where cops and community feel like two different sides of an endless fight — brought their kids to try and bridge that separation.

“I teach my kids that violence is not the answer, and that police officers are not bad,” Evalyn Kendall said outside Our Lady of the Lake Hospital, where five of the six officers were taken. As soon as she heard about the shooting, she drove to Walmart to buy flower bouquets.

That night, her five children carried the flowers toward two Baton Rouge police officers standing guard at the hospital entrance.

“This is to thank the police officers for keeping us safe,” explained the oldest, 11-year-old Kaylah Reed. She wore a flowered headband in her hair and a shy smile.

The siblings laid their bouquets beside the door as Kendall watched from her car. It wasn’t much, but it was what she could give.

Amy Brittain contributed to this report.