An army veteran with a personal arsenal amassed at his home is believed to be the lone gunman responsible for the fatal sniper shooting of five police officers in Dallas Thursday night.

Micah Xavier Johnson, 25, died following a standoff with police during which he said he "wanted to kill white people, especially white police officers," police Chief David Brown told reporters in the aftermath of the deadly rampage. Johnson was killed by a robot-delivered bomb.

A search of his home Friday turned up bomb-making materials, firearms, ammunition and a "journal of combat tactics," the Dallas police said in a statement.

Johnson was a private first class from the Dallas suburb of Mesquite with a specialty in carpentry and masonry. He was also an army reservist who did one tour in Afghanistan from November 2013 to July 2014, the military said.

Police said Johnson had no criminal record, and investigators were analyzing the information contained in the journal.

Dallas Mayor Mike Rawlings said late Friday afternoon that Johnson acted alone. Rawlings declared that the city was safe and "we can move on to healing." He said the gunman wore a protective vest and used an AR-15 rifle, a weapon similar to the one fired last month in the attack on an Orlando, Fla., nightclub that killed 49 people.

Dallas mayor updates on shooting2:22

When the gunfire began, the mayor said, about 20 people in the crowd were carrying rifles and wearing protective equipment. That raised early concerns that they might have been involved. But after conducting interviews, investigators concluded all the shots came from the same attacker.

Dallas police said at least 12 officers discharged their duty weapons.

"There was confusion with everybody running around, but this was a mobile shooter that had written manifestos on how to shoot and move, shoot and move, and he did that," the mayor said. "He did his damage, but we did … damage to him as well."  

Seven officers and two civilians were also wounded as a result of the sniper fire.

During the standoff that followed, Johnson told police he was upset at white people, and claimed to have planted explosives in the area, according to Brown. He also told officers he was angry about the recent spate of police shootings. 

He died when police sent in a robot armed with an explosive, Brown said. 

"Other options would have exposed our officers to grave danger," Brown told reporters. 

Rawlings said earlier that police swept the area after the standoff ended and found no explosives.

Authorities initially blamed multiple snipers for Thursday's attack, and at one point said three suspects were in custody. But by Friday afternoon, all attention focused on Johnson.

'Ambush style' attack

Gunshots erupted around 8:45 p.m. CT Thursday while hundreds of people were gathered to protest fatal police shootings this week in Baton Rouge, La., and St. Paul, Minn

Brown told reporters earlier that the shots were fired "ambush style" on police "to injure and kill as many officers as they could."

Video footage from the Dallas scene showed protesters were marching along a street in downtown, just under a kilometre from city hall, when shots were fired and the crowd scattered, seeking cover.

WARNING: This video contains images and audio that some may consider disturbing

The search for the attackers stretched throughout downtown, an area of hotels, restaurants, businesses and some residential apartments. The area is only a few blocks away from Dealey Plaza, where President John F. Kennedy was assassinated in 1963. 

'Everyone just started running'

The scene was chaotic, with helicopters hovering overhead and officers with automatic rifles on the street corners.

"Everyone just started running," Devante Odom, 21, told the Dallas Morning News. "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 shooting was "strategic. It was tap, tap pause. Tap, tap pause," he said.

Obama: 'No possible justification' 

U.S. President Barack Obama said early Friday that America is "horrified" over the shootings.

Speaking from Warsaw, where he's meeting with leaders of the European Union and attending a NATO summit, Obama said justice will be done and he's asking all Americans to pray for the fallen officers and their families.

U.S. attorney general on Dallas attack1:34

Attorney General Loretta Lynch also condemned the killings, and called on Americans not to accept the recent violence as "the new normal." 

"Turn to each other, not against," Lynch said during a brief news conference, adding lawmakers must take a "hard look" at gun laws. 

Protests were held in several other cities across the country Thursday night after a Minnesota officer on Wednesday fatally shot Philando Castile while he was in a car with a woman and a child.

The aftermath of the shooting was live streamed in a widely shared Facebook video. A day earlier, Alton Sterling was shot in Louisiana after being pinned to the pavement by two white officers. That, too, was captured on a cellphone video.

'Our hearts are broken'

Four of the officers who were killed were with the Dallas Police Department, a spokesman said. One was a Dallas Area Rapid Transit (DART) officer. The agency said in a statement that 43-year-old Brent Thompson was the first DART officer killed in the line of duty since the agency formed a police department in 1989.

"Our hearts are broken," the statement said.

One of the wounded civilians was Shetamia Taylor, 37, according to her sister, Theresa Williams. 

Williams told The Associated Press her sister was at the protests with her four sons, ages 12 to 17.

When the shooting began, Taylor threw herself over her sons, and was shot in the right calf, Williams said, adding Taylor was undergoing surgery early Friday.

Demonstrations were once again held in several U.S. cities Friday in the aftermath of the Dallas shootings as well as of Castile and Sterling. The biggest was in Atlanta, where thousands of people marched through downtown Friday evening, bringing traffic to a standstill in a protest that seemed peaceful. Other marches, sit-ins and vigils were held in Boston, Denver, Pittsburgh and in Los Angeles, led by rappers Snoop Dogg and The Game.

With files from The Associated Press and Reuters