At a memorial service for the five police officers shot and killed in Dallas last week, President Obama called for unity, and argued that the country is not as divided as it may seem.
"We see all this and it's hard not to think, sometimes, that the center won't hold and that things could get worse," he said. "I understand. I understand how Americans are feeling. But Dallas, I'm here to say we must reject such despair. I'm here to insist that we are not as divided as we seem, and I know that because I know America. I know how far we've come against impossible odds."
Mr. Obama said that even though the situation feels like "the deepest fault lines of our democracy have been exposed," the five officers who were killed were helping to uphold the constitutional rights of Americans.
"That's what these five were doing last Thursday,hen they were assigned to protect and keep orderly a peaceful protest in response to the killing of Alton Sterling in Baton Rouge and Philando Castile in Minnesota: They were upholding the constitutional rights of this country," he said. "For a while the protest went on without incident--and despite the fact that police conduct was the subject of the protest, despite the fact that there must have been signs or slogans or chants with which they profoundly disagreed, these men and this department did their jobs like the professionals that they were."
Mr. Obama's choice of traveling companions underscored the theme of unity. Republican Sen. Ted Cruz of Texas and House Democratic Leader Nancy Pelosi of California both joined Obama on Air Force One for the flight to Dallas.
White House Press Secretary Josh Earnest said the president worked late into the night writing his speech and consulting scripture for inspiration.
The five white police officers were targeted and slain by a black man who said he wanted revenge for the killings of blacks by police. They were killed last Thursday while standing guard as hundreds of people peacefully protested the police killings of black men in Louisiana and Minnesota earlier in the week. The president has denounced the shooting by an Army veteran-turned-sniper as a "vicious, calculated and despicable attack on law enforcement."
Just a few weeks ago, Mr. Obama spent hours in Orlando, Florida, consoling the loved ones of 49 people who were killed in a shooting rampage at a nightclub.
The president, joined by his wife, Michelle, and Vice President Joe Biden and his wife, Jill, will also meet privately with the families of the slain officers as well as the injured to convey the support and gratitude for their service and sacrifice that has been expressed around the country. At least nine other officers and two civilians were injured in the attack.
Former President George W. Bush and his wife, Laura, also attended. Bush, a Dallas resident, said the slain officers represent "the best among us."
"Today the nation grieves but those of us who love Dallas and call it home have had five deaths in the family," he said. "Laura and I see members of law enforcement every day. We count them as our friends. And we know like for every other American that their courage is our protection and shield."
He called on the country to avoid giving in to fear and division.
"At our best we know we have one country, one future, one destiny. We do not want the unity of grief nor do we want the unity of fear," he said. "We want the unity of hope, affection and high purpose. We know that the kind of just, humane country we want to build, that we have seen in our best dreams, is made possible when men and women of uniform stand guard."
Mr. Obama and Biden met Monday with police chiefs, sheriffs and rank-and-file officers to discuss adopting a series of reforms that were drafted by a White House task force on policing, as well as how to restore trust between police officers and the communities they are sworn to serve and protect.
The president also planned a meeting Wednesday with a broader group that includes law enforcement, activists and academics.