DALLAS -- At a memorial for slain police officers, President Barack Obama declared Tuesday that a week of deeply troubling violence has seemed to expose "the deepest fault lines of our democracy." But he insisted the nation is not as divided as it seems and called on Americans to find common ground in support of racial equity and justice.
Obama acknowledged that Americans are unsettled by another mass shooting and are seeking answers to the violence that has sparked protests in cities and highlighted the nation's persistent racial divide.
Five Dallas officers were killed last Thursday while standing guard as hundreds of people protested the police killings of black men in Louisiana and Minnesota earlier in the week.
"It's hard not to think sometimes that the center might not hold, that things might get worse," Obama said. "We must reject such despair."
He joined politicians, police officers and families of the fallen in the wake of the shocking slayings by a black man who said he wanted revenge for the killings of blacks by police.
"The soul of our city was pierced," Dallas Mayor Mike Rawlings said as he welcomed Obama to the memorial service. It was organized to help combat "a common disease" of violence and honor those who fight it, "our men and women in blue, our peacemakers in blue."
Rawlings spoke steps from five empty chairs and portraits of the dead officers.
A call for national unity and solidarity was reinforced by several speakers at the interfaith service, including former President George W. Bush, a Dallas resident, who attended with his wife, Laura.
"At times it feels like the forces pulling us apart are stronger than the forces binding us together," Bush said. "Too often we judge other groups by their worst examples, while judging ourselves by our best intentions. And this has strained our bonds of understanding and common purpose."
"We want the unity of hope, affection and higher purpose," he said.
Obama has denounced the shooting as a "vicious, calculated and despicable attack on law enforcement" by a "demented" individual. And he has argued that, despite the heated public outcry of the past week, the country is not as divided as it may seem.
Obama's choice of traveling companions underscored the theme. Republican Sen. Ted Cruz of Texas and House Democratic Leader Nancy Pelosi of California joined Obama on Air Force One for the flight to Dallas. Republican Sen. John Cornyn of Texas spoke at the service but did not travel with the president. He said the attack was deeply personal.
"Being a Texan doesn't describe where you're from, it describes who your family is," the senator said.
The White House said the president worked late into the night writing his speech and consulting scripture for inspiration.
Just a few weeks ago, Obama spent hours in Orlando, Florida, consoling the loved ones of 49 people who were killed in a shooting rampage at a nightclub.
The Dallas attack ended with the gunman, Micah Johnson, 25, blown up by a bomb delivered by a police robot. The black Army veteran portrayed his attack on the officers as payback for the fatal police shootings of black men in Baton Rouge, Louisiana, and suburban Minneapolis.
Portions of both shootings were videotaped and broadcast nationwide, leading to fresh outrage, protests and scores of arrests. The killings also put the country on edge, heightened racial tensions and pushed the issue of the use of deadly force against black males by white police to the forefront.
Obama sought to begin bridging those issues with his tribute to the fallen five, who included a former Army Ranger, a Navy veteran and a newlywed starting a second family.
Some police officials blame the president for the rise in racial tension, saying he is insufficiently supportive of law enforcement. In comments since the Dallas shooting, Obama has urged the public to recognize and respect that police officers have a tough job.
Meanwhile, he has been criticized by others for going to Dallas before visiting Louisiana or Minnesota.
As Obama landed in Dallas, spokesman Josh Earnest said the president had telephoned the families of Alton Sterling, the man shot by police in Baton Rouge, and Philando Castile, the Minnesota motorist shot by an officer, to offer his and the first lady's condolences.
Obama included references to both men in his remarks at the service.
The Obamas, the Bushes, Vice President Joe Biden and his wife, Jill, and other officials on stage held hands in a show of unity as the service was brought to a close with "The Battle Hymn of the Republic." Audience members also clasped hands during the patriotic song.
Before walking offstage, Obama, Mrs. Obama, Bush and Laura Bush turned and applauded the audience of uniformed police officers.
The Obamas and the Bidens were also meeting privately with families of the slain officers and those who were wounded. At least nine other officers and two civilians were injured in the attack.
Obama pays tribute to Dallas officers shot in racial attack
More TOP STORIES News