U.S. President Barack Obama was in Dallas today where he called for unity at the interfaith memorial for the five Dallas police officers who were killed by a sniper, who was upset over recent killings by police of black men.

The president made a plea for greater unity and empathy, calling on law enforcement officials to not see racial biases in arrests and sentencing as "an attack on cops," and for protesters to understand the risks police officers face in patrolling dangerous neighbourhoods.

Obama bemoaned the lack of political will to effect meaningful change, despite the high number of mass shootings that have occurred during his presidency, admitting, "I've seen how inadequate my own words have been."

"If we are to honour these five outstanding officers who we lost, then we will need to act on the truths that we know," he said.

Obama called for greater investment in schools and anti-poverty measures, as well as funding drug and mental health treatment, to help prevent violence. He also lamented the easy access to firearms.

"We flood communities with so many guns that it is easier for a teenager to buy a Glock than get his hands on a computer or even a book."

George W. Bush-Biden

Former U.S. president George W. Bush, right, also spoke at Tuesday's memorial. Bush is seen with wife and former first lady Laura Bush, Vice-President Joe Biden and wife Jill Biden. (Mandel Ngan/AFP/Getty Images)

Obama praised the Dallas police for showing "incredible restraint" in the chaos and confusion of the mass shooting and said the police force "saved more lives than we will ever know."

Dallas Mayor Mike Rawlings welcomed Obama to the memorial service. "The soul of our city was pierced," he said, adding that the group had assembled to combat "a common disease" of violence on the streets and to honour those who fight it, "our men and women in blue, our peacemakers in blue."  

Rawlings also noted the five empty seats at the memorial for the five officers who died last week in Dallas. 

"We love you, we will never forget you," he said of the officers.

AFP_D47JF

Photos of the victims of the Dallas police shooting are seen during an interfaith memorial service at the Morton H. Meyerson Symphony Center in Dallas. (Mandel Ngan/AFP/Getty Images)

Former president George W. Bush, who attended the service with his wife, Laura, also spoke at the memorial.

"At times it feels like the forces pulling us apart are stronger than the forces binding us together," Bush said. "Argument turns too easily into animosity."

Bush said Americans should "remember their shared commitments for common ideals" as a means of bridging divisions.

"With their deaths, we have lost so much," he said of the five officers.

Brown recites Stevie Wonder

Dallas police Chief David Brown recited lyrics from Stevie Wonder's song As to the families of the five officers who were fatally shot last week.

Brown said that he often would find himself at a loss for words as a young man trying to get dates and would use lyrics to express himself.

Michelle Obama-Barack

Michelle Obama wipes away tears during Tuesday's service. (Susan Walsh/Associated Press)

That's what he did at the service for the families of those who died.

Brown received a long, loud standing ovation from those in attendance. 

Vice-President Joe Biden also attended today's service.

The memorial service concluded with the elected officials and guests on stage holding hands as Battle Hymn of the Republic was sung.

Obama will host a meeting with law enforcement officials, activists and civil rights leaders on Wednesday to discuss ways to repair "the bonds of trust" between communities and police.

Officers Brent Thompson, Patrick (Patricio) Zamarripa, Michael Krol, Lorne Ahrens and Michael Smith were all slain in the line of duty by an army veteran in what Obama denounced as a "vicious, calculated and despicable attack" by a "demented" individual. 

Relations between police and the black community in Dallas1:32

The attack ended when the gunman, Micah Johnson, 25, was killed by a bomb delivered by a police robot. Johnson described the attack on the white officers as payback for the fatal police shootings of Alton Sterling in Baton Rouge, La., and Philandro Castile in suburban Minneapolis, according to authorities.

Portions of both shootings were recorded and broadcast nationwide, leading to 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 officers to the forefront.

"Even those who dislike the phrase black lives matter, surely we should be able to hear the pain of Alton Sterling's family," Obama said.

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.

With files from Reuters and The Associated Press