The ambush started with gunshots that killed five officers and sent screaming crowds scrambling for cover. It ended when a Dallas police bomb squad robot killed a gunman after negotiations failed.
Investigators identified the dead attacker as Micah Xavier Johnson, 25, of Mesquite, Texas, a military veteran who'd served in Afghanistan.
Police searched his home Friday and found bomb-making materials, ballistic vests, rifles, ammunition and a personal journal of combat tactics. They are analyzing information in the journal, police said in a statement.
Investigators determined Johnson was "the lone shooter in this incident," Dallas Mayor Mike Rawlings said, confirming what federal officials had told CNN.
"This was a mobile shooter who had written manifestos on how to shoot and move, shoot and move, and that's what he did," Rawlings said at a news conference.
"As we've started to unravel this fishing knot, we've come to realize this shooting came from one building at different levels."
Rawlings said investigators' initial confusion about the number of shooters was partly because about 20 protesters wearing protective vests and carrying rifles scattered when the shooting started.
Authorities said three suspects were in custody earlier Friday, but later told CNN they had been questioned and released.
Dallas police Chief David Brown provided more details during a prayer rally Friday.
"Through our investigation of some of the suspects, it's revealed to us that this was a well-planned, well-thought-out, evil tragedy," he said.
Nobody has been charged, Gov. Greg Abbott said, but police want to make sure every lead is investigated.
The deadly gunfire erupted in Dallas after videos showing two African-American men shot by police in Louisiana and Minnesota spurred protests and debate over police use of force across the country.