In the traumatic hours after a deadly ambush of Dallas police, and outpouring of grief and sympathy flooded the Dallas police station. (Video: Dalton Bennett/The Washington Post)

DALLAS — President Obama on Saturday sought to calm a country riven by grief and anger in the wake of the fatal shooting of five police officers in Dallas and recent high-profile deaths at the hands of officers elsewhere.

Obama’s comments came as Dallas continued to reel from the rampage while protests over how police use deadly force flared in cities across the country, ranging from peaceful marches in Washington to scuffles with police in Baton Rouge, La.

In Dallas, investigators pored over the crime scene and peered deeper into the gunman’s background, including a journal describing “combat-style” tactics such as firing and moving to a new position — a method used in Thursday’s ambush that left five police officer dead.

In a sign of the tensions, SWAT teams and other teams mobilized around the city’s police headquarters after an unspecified threat. No suspect or dangerous item was located, police said, but the sweeping response showed the level of heightened alert.

“As painful as this week has been, I firmly believe that America is not as divided as some have suggested,” Obama said while in Poland for a NATO summit. “Americans of all races and all backgrounds are rightly outraged by the inexcusable attacks on police, whether it’s in Dallas or any place else.”

Police say the attacker in Thursday’s rampage — identified as Micah Xavier Johnson, a black 25-year-old from a nearby suburb — told them he was angry over police killings of black men, an issue that surged back into the news this week after these recent incidents in Baton Rouge and outside St. Paul, Minn. Before authorities used a bomb to kill Johnson, they say he told police he wanted to kill white officers.

The victims of the Dallas protest shooting

Brown said the attacker’s comments were made during a prolonged, and at times violent, standoff that followed the brutal shooting rampage Thursday night during a peaceful protest over police shootings.

A journal “filled with combat-type tactics” was recovered from the suspect’s home, said Judge Clay Jenkins, Dallas County’s chief executive. The “somewhat voluminous” journal includes “shoot and move” strategies, Jenkins said.

“It’s a concept of wanting to move from vantage point to vantage point, without being pinned down in one location, to inflict as much damage as possible,” Jenkins said.

The journal was one piece of a puzzle that has led investigators to believe that the suspect acted alone. Initially, because gunfire appeared to have come from multiple locations, shooting people at different angles, authorities believed more than one suspect could have been involved.

The attack fused two topics that have roiled the country in recent years — mass shootings and outrage over how police use force — bringing them together in a horrific way decried by law enforcement officials around the country and activists protesting police shootings alike.

Obama said “Americans of all races and all backgrounds are also rightly saddened and angered” over the deaths this week of black men fatally shot by police officers in Louisiana and Minnesota. He also tied the mass shooting here to some of the rampages that have claimed dozens of lives since last year, invoking the rampages at a historic black church in Charleston, S.C.; a gay club in Orlando; and an office party in San Bernardino, Calif.

“We cannot let the actions of a few define all of us,” Obama said. “The demented individual who carried out those attacks in Dallas, he’s no more representative of African Americans than the shooter in Charleston was representative of white Americans, or the shooter in Orlando, or San Bernardino, were representative of Muslim Americans. They don’t speak for us. That’s not who we are.”

In Dallas, details of the shooting were still coming into focus, as investigators sought to piece together what happened before and during the attack.

Around the stretch of downtown where the shooting occurred, signs of violence still littered the streets. Police officers monitoring the perimeter of the crime scene mixed Saturday with reporters and occasional people walking their dogs in Belo Garden Park. Shattered glass remained on the ground along Elm Street. A handful of FBI investigators, wearing gloves and blue booties on their feet, came and went from the scene.

A makeshift memorial of flowers sat at the base of three flagpoles not far from where the shooting began. Someone had tied a red T-shirt tied around one of the poles with the words, “Police Lives Matter.”

A woman knelt nearby, her eyes shut tight, praying. A mile south at the Dallas Police Headquarters, a memorial to the five fallen officers had continued to grow. Flowers, balloons and ribbons covered a Dallas police cruiser and a Dallas Area Rapid Transit car. Hundreds of people had handwritten left notes on cards stamped with the phrase, “We unite.” “Prayers for you and for all law enforcement,” a woman named Rita had written. “We will forever be grateful for all y’all do,” a man named Jeremiah had written.

Dallas shooter ‘was a good kid’, says neighbor. ‘I believe he just snapped.’

“He did his damage, but we did our damage to him as well,” said Dallas Mayor Mike Rawlings. “And we believe now that the city is safe and that the suspect is dead and we can move on to healing.”

Police had also said they took three other people into custody — two men and a woman — but they have offered no word on if these people were still being held or why. A Dallas police spokeswoman did not respond to a request for comment.

Fear rippled through law enforcement nationwide, meanwhile, as police chiefs from Washington to Los Angeles ordered patrol officers to go out in pairs for safety. Officers were also shot in Missouri and Georgia in separate incidents, leaving one in critical condition.

A peaceful protest gives way to an urban war zone

And investigators in Tennessee said they believed a man who opened fire on a parkway before exchanging gunfire with police may have been motivated by concerns over encounters involving police and black Americans. The shooting spree, which occurred before the Dallas attack but after anger was boiling over from the Louisiana and Minnesota shootings, left one woman dead and two people injured. A Bristol, Tenn., police officer was also shot in the leg before officers shot and wounded the attacker.

The bloodshed in Dallas marked the deadliest single day for the nation’s police since the Sept. 11, 2001, terrorist attacks, with five officers killed and seven others injured.

Gunfire began here around 9 p.m. Thursday, and while people scrambled for cover and sheltered in place and police tried to figure out what they were confronting, some people in the area posted videos to social media showing the killings in real time. One video showed a person with an assault-style rifle shooting a police officer in the back at point-blank range.

Johnson at one point fled to a college building downtown, authorities say. For hours after the initial assault, police were locked in a standoff with the shooter, exchanging gunfire and negotiating with him. During these discussions, he told police they would eventually find explosives he planted, but as of Saturday, authorities have not said they found any devices.

Dallas Police Chief David Brown lost his son, former partner and brother to violence

Brown said police placed an explosive device on their bomb robot and used it to kill Johnson. Rawlings said the robot was the same kind typically used to detonate and defuse bombs, and in this case was used to place C-4 explosives and detonate them.

Avis Blanton, who lived next door to Micah Xavier Johnson and his family for more than 12 years in the Dallas suburb of Mesquite, said Johnson “was a good kid. He was truly, truly good.” In an interview Friday, she said she believes Johnson “just snapped.”

“Black folks are tired,” Blanton, 43, said. “We are just tired. I am not justifying what he did, but I see why he did it.”

An Army reservist who had deployed to Afghanistan — and, according to the Associated Press, was accused of sexual harassment by a female soldier while there — Johnson killed fellow veterans. Four of the five slain officers had served in the military.

Brent Thompson, 43, was a transit police officer and a newlywed. Patrick Zamarripa, 32, had served three tours in Iraq. Michael Krol, 40, had joined the Dallas police in 2008. Lorne Ahrens, a former semi-pro football player, had been with the department for 14 years. Michael Smith, a father of two, liked to give department stickers to the children at his church.

Police nationwide order officers to ride in pairs after Dallas police ambush

Obama, who ordered flags flown at half-staff until Tuesday, planned to cut short his trip in Europe so he can visit Dallas next week.

Rawlings, the Dallas mayor, toured the site of the shooting Saturday, stopping at a park bench for a moment before breaking down in sobs.

“I just want everybody to take a time out here. I just want those officers lives to matter,” he said. “If we don’t use this to create something good, then it’s just an absurdity what happened, a Camus-like absurdity. It’s like watching a plague take over. History is a dance, we go backwards and forwards. And now we can dance toward progress, or dance toward chaos.”

Dennis reported from Dallas. Wan and Berman reported from Washington. Joel Achenbach, Jamie Thompson, Louisa Loveluck and Keith L. Alexander in Dallas; and Julie Tate, Jennifer Jenkins, Tom Jackman, Peter Hermann, Thomas Gibbons-Neff, Magda Jean-Louis and Brian Murphy in Washington contributed to this report.

Further reading:

Nation’s officers on edge as deaths in Dallas bring yearly toll among police to 25

‘Vicious’ attack on police in Dallas by black shooter raises pressure on Obama

Bahamas issues travel advisory for the U.S. aimed at interactions with police

[This story has been updated.]