Bomb-making material, rifles, ammunition and a combat journal have been found at the home of the suspect in the Dallas shootings, officials say.
Five police officers were killed and seven wounded in a hail of gunfire during a protest on Thursday against the shooting of black men by police.
The suspect, 25-year-old Micah Johnson, died after a long stand-off with police in central Dallas.
Mayor Mike Rawlings said officials believed he was “the lone shooter”.
“We believe now the city is safe,” the city mayor said at a news conference on Friday.
The protest in Dallas took place after this week’s deaths of Philando in Minnesota and Alton Sterling in Louisiana.
Officials said on Friday that a number of gun attacks on police officers and civilians had occurred in the aftermath of the deaths in Minnesota and Louisiana.
- In Tennessee, a black army veteran killed a woman and also injured three other people, including a police officer, as he opened fire on a motorway on Thursday morning, before the Dallas attacks. After his arrest, Lakeem Keon Scott told investigators he was troubled by police violence against African-Americans
- In Missouri on Friday, a police officer was shot from behind after he walked back to his patrol car to check the driving status of a black man who he had stopped. Antonio Taylor, 31, was later arrested but the motive for the shooting is unknown
- In Georgia on Friday, an officer was shot after he responded to a call from a man who said his car had been broken into. Again the motive is unknown
Protests against police killings were also held in other US cities, including Houston, New Orleans and San Francisco. In Baton Rouge, Louisiana, protesters chanted “no justice, no peace, no racist police”.
There have been some arrests at the rallies, but again they have been peaceful.
In Dallas, Mayor Rawlings addressed thousands at a vigil to honour the police officers, urging Americans to “step up” to heal the nation’s racial wounds.
‘Wanted to kill whites’
Police in Dallas said the bomb-making material was found when they searched Micah Johnson’s home in the suburb of Mesquite.
They also confirmed media reports that the suspect, an army veteran, was the person killed when they remotely detonated explosives they sent into the car park where he was holed up.
Mr Rawlings said the suspect was given a choice of “surrendering without harm or remaining in place”, adding that he chose “the latter”.
The authorities said that Johnson had no criminal history.
Police chief David Brown said the suspect had told a negotiator that he had wanted to kill white people, especially white police officers, because he was angry about the recent shootings of black men by police.
Mr Brown added that the man had said he was not affiliated with any groups and had acted alone.
Police arrested three people and initially said they believed at least two snipers had caught police in crossfire, shooting some officers in the back.
Two civilians were also injured.
Micah Johnson lived with his mother in Mesquite, an eastern suburb of Dallas, and had been a member of the US Army Reserve, US media reported.
President Barack Obama, who is attending a Nato summit in Poland before a visit to Spain, called the Dallas killings a “vicious, calculated and despicable attack on law enforcement”.
He ordered all flags on public buildings to be flown at half-mast.
Mr Obama will visit Dallas early next week, cutting short the Spanish part of his European trip, the White House said.
The Dallas attack marks the deadliest day for US law enforcement officers since the 9/11 attacks in 2001.
Reacting to the latest shootings, presumptive Democratic presidential nominee Hillary Clinton said: “There is too much violence, too much hate, too much senseless killing, too many people dead who shouldn’t be. No-one has all the answers. We have to find them together.”
Meanwhile, her Republican opponent Donald Trump said in a video the shooting in Dallas “has shaken the soul of our nation”.
He added: “The deaths of Alton Sterling in Louisiana and Philando Castille in Minnesota also make clear how much more work we have to do to make every American feel that their safety is protected.”
Philando Castile was shot dead after being stopped in his car by police in St Paul, Minnesota , on Wednesday. Alton Sterling was killed by police a day earlier in Baton Rouge, Louisiana.
Both incidents were captured on video, reigniting what has become a national debate.