The suspect in an attack that left five officers dead was killed by police with a robot bomb.
Police have identified Micah Xavier Johnson, 25, as the suspect who was killed by police after he was involved in the fatal shooting of five officers during a protest against police brutality in Texas.
Johnson, a former soldier in the US army from the nearby city of Mesquite, served a tour in Afghanistan, the army said on Friday. They said Johnson had no criminal record and no ties to "terror" groups.
Police have also said he was "not affiliated" with any groups and claimed to be acting on his own accord.
The incident took place on Thursday night during a peaceful Black Lives Matter protest against police killings of black Americans across the country.
The officers were shot by snipers from elevated positions, the Dallas Police Department said.
Another seven officers and two civilians were wounded, according to the Dallas Morning News.
Dallas, the third largest city in the US state of Texas, is home to an estimated 1.3 million people.
"The suspect said he was upset about Black Lives Matter," Brown told reporters. "He said he was upset about the recent police shootings; the suspect said he was upset at white people.
"The suspect said he wanted to kill white people, especially white officers," he continued. "The suspect stated that we will eventually find the IEDs. The suspect stated he was not affiliated with any groups and he stated that he did this alone."
The suspect exchanged fire with police officers and was then killed by police when they detonated an IED carried by a robot in the parking garage of the El Centro College in downtown Dallas.
Brown said negotiations broke down and police "saw no other option but to use our bomb robot". He added that three other suspects are presently in police custody.
Dallas Mayor Michael Rawlings urged people to join a prayer vigil for the officers who were killed at noon local time.
Heidi Zhou-Castro said it was "the worst attack on law enforcement officers in the United States" since the September 11 attacks in 2001.
"It is a different Dallas altogether this morning as people awoke to this tragic news," she told Al Jazeera from Dallas.
Country-wide protests
The primary Twitter account associated with the Black Lives Matter said the movement "advocates dignity, justice and freedom. Not murder".
#BlackLivesMatter advocates dignity, justice and freedom. Not murder. — Black Lives Matter (@Blklivesmatter) July 8, 2016
Speaking to Al Jazeera from Washington DC, Debbie Hines, a lawyer and former Baltimore city prosecutor said the "vigilantism is not going to solve any of the problems we have in the US".
"The divisiveness is caused by institutionalised racism in this country, and that's not an easy fix. But I think that on a simplistic level the police have to be retrained," she said.
"One thing we need to do is to get a hold of how pervasive the problem is and that would mean a national database of collections of how many officer-involved shootings and police brutality, as well as officer-involved deaths, that we presently don't have."
The protest in downtown Dallas was called after police killed two black men within 48 hours earlier this week - Alton Sterling in Louisiana on Tuesday and Philando Castile in Minnesota on Wednesday.
Both the mayor and the police chief said the protest was peaceful.
Several protests that took place across the country passed without incident.
Castile was shot dead by a police officer while he was in a car with his partner Diamond Reynolds and her daughter in a St Paul suburb.
READ MORE: Does Black Lives Matter really matter?
Reynolds live streamed the aftermath of the shooting in a widely shared Facebook video.
A day earlier, Sterling was shot in Louisiana after being pinned to the pavement by two white officers. That, too, was captured on a mobile phone video.
Of the 566 people killed by US police so far this year, The Guardian's database on police killings says at least 24 percent were Black.
African Americans comprise 13.3 percent of the country's population of 321million, according to the US Census Bureau.
'Vicious, calculated and despicable'
US President Barack Obama, addressing the media in Warsaw where he is attending a NATO summit, called the Dallas incident a "vicious, calculated and despicable attack" for which there was "no possible justification".
"We need to be supportive of those officers who do their job every single day. Today is a wrenching reminder of the sacrifices they make for us. When people are armed with powerful weapons, it makes attacks like these more deadly and more tragic."
OPINION: Ferguson onward - two anniversaries
A day earlier, responding to the recent killings of black men by police, he said that all Americans should be concerned about racial disparities in the criminal justice system.
"I also said yesterday our police have an extremely difficult job and that the vast majority are doing their job in outstanding fashion," Obama said.
'Everyone started running'
Describing the reaction to the Dallas shootings, Devante Odom, 21, told The Dallas Morning News; "Everyone just started running, We lost touch with two of our friends just trying to get out of there."
Carlos Harris, who lives downtown, told the newspaper that the gunmen "were strategic. It was tap tap pause. Tap tap pause."
Video footage from the scene showed protesters marching along a street in the city centre, about half a mile from City Hall, when the shots erupted and the crowd scattered, seeking cover.
Texas Governor Greg Abbott called for unity.
READ MORE: Muhammad Ali and Black Lives Matter
"In times like this we must remember - and emphasise - the importance of uniting as Americans," he said, in a statement.
The search stretched throughout downtown Dallas, an area of hotels, restaurants, businesses and some residential apartments. The scene was chaotic, with helicopters hovering overhead and officers with automatic rifles on street corners.
In midtown Manhattan, protesters first gathered in Union Square Park where they chanted, "The people united, never be divided!" and "What do we want? Justice! When do we want it? Now!"
In Minnesota, where Castile was shot, hundreds of protesters marched in the rain from a vigil to the governor's official residence. Protesters also marched in Atlanta, Chicago and Philadelphia.
Source: Al Jazeera and agencies
On Thursday, five police officers were killed and seven were injured after a sniper attacked a public protest march in downtown Dallas, Texas. Sources indicate at least three other people were taken into custody for questioning relating to the attack. The march was held to protest the shooting deaths of Alton Sterling in Louisiana and Philando Castile in Minnesota during engagements with police officers.

Police identified 25-year-old Micah Johnson as the suspect. Johnson had previously served in the US army, and police reported he said he wanted to exact revenge upon police officers after news of Sterling and Castile's deaths. Ammunition and weapons were found inside Johnson's home. Dallas Police reported the policemen were shot at from a height. Officials said two civilians were also injured in the attack. 
File photo of police car lights.
Micah Johnson served for the  from 2009 until early 2015, including a tour of Afghanistan. Johnson had no criminal record.  His attack was reported to be a lone mission.

After the attack earlier on Thursday, police killed Micah Johnson in 's parking lot by a bomb explosion.

Hillary Clinton, 2016 United States presidential election candidate and favorite for the Democratic nomination this July, 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." 

After Johnson was killed, , Dallas' mayor, said "We believe now the city is safe".