DALLAS - President Barack Obama will cut short a foreign trip and head to Dallas next week as a shooting rampage by a black army veteran bent on killing white police triggers urgent calls to mend America's troubled race relations.
Police found bomb-making materials and a weapons cache at the home of 25-year-old Micah Johnson, a Dallas area resident who gunned down five officers before dying in a standoff with police.
While the White House ruled out any link between the gunman and known "terrorist organizations," Johnson's Facebook page ties him to several radical black activist movements listed as hate groups in the United States.
Described to police as a "loner" with no prior criminal record, Johnson told negotiators before he died that he wanted to kill white cops in retaliation for the recent fatal police shootings of two black men.
The rampage in Texas, which erupted Thursday night during a peaceful protest against police brutality, comes at a time of intense soul-searching over the use of lethal force by law enforcement towards African-Americans.
Leaders of the Black Lives Matter protest movement condemned the violence in Dallas, while vowing to uphold marches planned for the weekend - with large crowds gathering Friday night in Atlanta, Georgia and scores outside the White House.
Addressing thousands of people at a prayer service in honor of the fallen officers, Dallas Mayor Mike Rawlings urged Americans to "step up" to heal the country's racial wounds.
"We will not shy away from the very real fact that we as a city, as a state, as a nation are struggling with racial issues," he told the crowd.
Rawlings echoed the message sent by Obama as the nation reeled from the latest violence: that black lives matter - and so do "blue" lives, those of police officers.
"We must step up our game and approach complicated issues in a different way," Rawlings said. "And race is complicated." Obama, who has ordered all flags on government buildings lowered to half-mast for five days, made it clear that violence against police had "no possible justification."
The president weighed in on the attacks from the Polish capital, where he was attending a NATO summit, calling the episode "vicious, calculated and despicable." The White House said Obama would return to the United States Sunday night - one day ahead of schedule - and visit Dallas early next week at the invitation of Rawlings.
The shootings - which left nine injured, seven of them police officers - sparked chaotic scenes of people running for their lives during a march by several hundred demonstrators in the city of 1.2 million, not far from the site where president John F. Kennedy was assassinated in 1963.
The peaceful protest in Dallas was one of several nationwide over the deaths of Alton Sterling in Louisiana and Philando Castile in Minnesota that prompted Obama to make an emotional appeal for urgent police reform.
The ambush marked the single biggest loss of life for law enforcement in America since the September 11, 2001 attacks, and was set to further strain already tense race relations.
"This must stop - this divisiveness between our police and our citizens," Dallas police chief David Brown said.
Johnson was killed in a tense showdown with police in a parking garage, by a bomb robot sent in by officers after hours of negotiations and an exchange of fire.
"This was a well-planned, well-thought out, evil strategy," said Brown of the gunman.
Bomb-making materials, weapons and ammunition were found in his home.
"He said he was upset about the recent police shootings," Brown said. "The suspect said he was upset at white people. The suspect stated he wanted to kill white people, especially white officers." Earlier, officials said three other people had been detained but it was unclear if any remained in custody.
US Homeland Security Secretary Jeh Johnson said the gunman now appeared to have acted alone.
However Texas Governor Greg Abbott said police would "continue down every rabbit trail... ensuring that we eliminate any other possible suspects or co-conspirators who may have aided this gunman in any way." The gunman told police he was not affiliated with any organized groups.
But Johnson's Facebook page ties him to a number of organizations listed as hate groups by the Southern Poverty Law Center, which studies such movements in the United States.
Groups that he "liked" include the New Black Panther Party (NBPP) and the Nation of Islam, both known for expressing virulently anti-Semitic and anti-white views, the SPLC said in a statement.
On his Facebook page, Johnson appears with his fist raised in a gesture reminiscent of the black power movement of decades ago in America - wearing a loose-fitting African style tunic against the backdrop of the red, black and green Pan-African flag, also popular during the black liberation drive of the 1960s in the United States.
Another of his "likes" is a group called the African American Defense League, whose leader called this week for bloody retaliation after the fatal shooting in Louisiana.
"We must 'Rally The Troops!'" the post read. "It is time to visit Louisiana and hold a barbeque. The highlight of our occasion will be to sprinkle Pigs Blood!"