The gunman killed in a stand-off with Dallas police said he was upset about the police shootings of black people and wanted to kill white officers, the city's police chief has said.
The suspect told police that he was working alone, Police Chief David Brown told reporters.
Five Dallas police officers were killed and seven wounded by gunmen during protests against the shooting of black men by police, authorities say.
Three people are in custody.
Mr Brown said the suspect had been killed when police used explosives placed by a robot to end a tense stand-off in a building where he was holed up.
He said the gunman had told a negotiator that he was "upset about Black Lives Matter [protest movement], he said he was upset about the recent police shootings. The suspect said he was upset at white people. The suspect stated that he wanted to kill white people, especially white officers."
Mr Brown added: "He said he was not affiliated with any groups, and he did this alone."
Gunfire broke out at around 20:45 local time on Thursday (01:45 GMT Friday) as demonstrators marched through the city.
The protests came after this week's deaths of Philando Castile in Minnesota and Alton Sterling in Louisiana.
President Barack Obama, who is attending a Nato summit in Poland, called it a "vicious, calculated and despicable attack on law enforcement". He said the entire city of Dallas was grieving and the "tight-knit US police community feels this loss to their core".
Speaking earlier, Mr Brown said the suspects were believed to have been working together, using rifles to carry out attacks while the protest rally was drawing to a close.
Two snipers had fired from "elevated positions", shooting some officers in the back, he said.
"We believe that these suspects were positioning themselves in a way to triangulate on these officers from two different perches... and planned to injure and kill as many law enforcement officers as they could," Mr Brown said.
The Dallas attack marks the deadliest day for US law enforcement officers since the 9/11 attacks in 2001.
Officers later surrounded a car park near El Centro College where the stand-off with the suspect took place.
Dallas Mayor Mike Rawlings said that two civilians, one man and one woman, were also injured in the shootings.
He told the NBC Today programme that the suspects in custody so far were not co-operating and were "tight-lipped".
Latest Stories
-
Hopeson Adorye to form ‘Jail Them’ advocacy group
1 hour -
Shatta Wale once cried and knelt to apologise to Mahama – Dr Lawrence Tetteh
1 hour -
Former UK Prime Minister Boris Johnson turned away from polling station after forgetting photo ID
1 hour -
Nigeria soldiers face trial for deadly air strike ‘mistake’
1 hour -
Akufo-Addo, Otumfuo to commission Kumasi International Airport on May 10
1 hour -
PWDs who gain admission into tertiary institutions will be prioritised with government scholarships – Bawumia
1 hour -
Strongman regrets involving Fella Makafui in Medikal feud
1 hour -
NPP must unite now or perish later – Ameyaw-Akumfi warns
1 hour -
Fuel price adjustment: petrol surges to GH₵15.22, diesel falls to GH₵14.65
2 hours -
Kojo Golden nominated for Afrobeat Artiste of the Year at Ghana Music Awards USA
2 hours -
Ford Foundation partners foster collaborative solutions for host Community Development Trusts implementation in Nigeria
2 hours -
Appiatse reconstruction: Support Bawumia to do more for Ghana – Richard Ahiagbah to Ghanaians
2 hours -
I wanted Harry Kane at Man United – Ten Hag
2 hours -
Ayorkumi: Stage play on slave trade premieres on May 11
2 hours -
Majority defends GRA-SML deal, insists no wrong was done
2 hours