President Obama Tries to Ease Racial Tensions With Stirring Ode to Dallas Shooting Victims

The president, vice president and former president George W. Bush - each accompanied by their wives - at Tuesday's somber event.

President Obama and former president George W. Bush paid tribute to the five slain Dallas police officers in a memorial that ended with a stirring address from the current commander-in-chief.

In his introduction, Dallas Mayor Mike Rawlings told service attendees that the dignitaries were there to help battle the "common disease" of violence and to honor "our men and women in blue, our peacemakers in blue."

The five officers were killed by a sniper while protecting a Black Lives Matter demonstration in the city last week

Following a touching musical ode to the fallen, who were honored with five chairs left empty save for an American flag and an officer's hat, George W. Bush was introduced by Senator John Cornyn.

"These slain officers were the best among us," the 43rd president said before naming each of the five victims. "Every officer has accepted a calling that sets them apart."

In his address, Obama followed his White House predecessor's lead, praising the murdered officers' decision to serve their communities despite the risks.

Read: First Black Miss Alabama Courts Outrage After Calling Dallas Shooter 'Martyr' in Viral Video

"People across the country are suffering, we're here to honor the memory and mourn the loss of five fellow Americans," Obama said. "And to try to find some meaning amidst our sorrow."

"Like police officers across the country, these men and their families shared a commitment to something larger than themselves" and even at Thursday's rally held in opposition to police conduct, the officers "did their jobs like the professionals that they were."

But, Obama noted, starting at around 9 p.m., shots rang out at the previously peaceful protest.

Patrick Zamarripa, 32, Brent Thompson, 43, Michael Smith, 55,  Lorne Ahrens, 48, and Michael Krol, 40, were killed when authorities say Micah Johnson attacked them and shot several others during the demonstration in the streets of Dallas.

"Another community torn apart, more hearts broken," Obama said. "I've been to too many of these things. I've seen too many families go through this."

Praising the city's handling of the tragedy, the president asked Americans not to give in to hate.

Read: Off-Duty Cop Kills Black Lives Matter Supporter Who Broke Into His Home: Police

"I understand how Americans are feeling. But Dallas, I'm here to say we must reject such despair," he said, returning to the message he offered following the tragedy.

He added: "We are not as divided as we seem. I know how far we've come against impossible odds. I know we'll make it because of my own experience in my life."

In addition to his sympathy to the fallen officers and their family and coworkers, the president appeared to voice sympathy for the cause of Black Lives Matter.

"Centuries of slavery and subjugation and Jim Crow didn't just vanish," Obama said. "America, we know that bias remains. Whether you are black or white or Spanish or Native American or of Middle Eastern descent, we've seen bigotry in our own lives.

"None of us is entirely innocent, no institution is entirely immune. And that includes our police departments," he said, while adding that the responsibility taken on willingly by the slain officers works both ways.

"We ask the police to do too much and we ask too little of ourselves. It's easier for a teenager to buy a glock than it is for him to get his hands on a computer or a book and then we tell police, 'you're the social worker, you're the parent, you're the teacher, you're the drug counselor.'"

Watch: Hero Mom Wounded While Shielding Her Sons From Gunfire During Dallas Sniper Attack