Washington: US President Barack Obama on Tuesday called on protesters, police and the public to open their hearts and drop their preconceptions to deal with racism and violence in the country. At a memorial service held in the Texas city of Dallas to honour five police officials killed on Thursday by a lone gunmen Micah Johnson, Obama lamented a flood of guns in cities, and a glaring and chronic mistrust between the police and citizens, Xinhua news agency reported. The five officials were killed because Johnson was upset about the fatal police shootings of two black men in the states of Louisiana and Minnesota. The gunmen opened fire at the end of a peaceful Black Lives Matter-organised protest in Dallas. Obama called on the country to confront racism and at the mean time support the ordinary Americans. He encouraged police and the public to acknowledge and confront the implications of entrenched institutional racism, while also demanding respect for police and the role they play. "The deepest fault lines of our democracy have suddenly been exposed, perhaps even widened," he said. "Faced with such violence, we wonder if racial divides can ever be bridged." Calling the shootings of the police officials an act of demented violence and racial hatred, Obama offered empathy to those who view police with suspicion, and to those who view anti-police protesters as disruptive and disrespectful. Obama said race relations had improved dramatically in his lifetime, adding that those who deny it were dishonouring the struggles that helped them achieve that progress. "But America, we know that bias remains. We know it. Don't dismiss peaceful protesters as troublemakers or paranoid." Meanwhile, former US President George W. Bush, now a Dallas resident, also attended the service and urged Americans to reject the unity of grief and fear. "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," he said. Last Thursday, a sniper named Micah Johnson opened fire on police officers during a Dallas downtown peaceful protest against police's killing of African Americans. As many as seven officers and two civilians were also wounded in the attack, which marked the deadliest day for US law enforcement since the September 11, 2001 terror attacks.