A Dallas Area Rapid Transit police officer receives comfort at the Baylor University Hospital emergency room entrance Thursday, July 7, 2016, in Dallas. Police say one rapid-transit officer has been killed and three injured when gunfire erupted during a protest in downtown Dallas over recent fatal shootings by police in Louisiana and Minnesota. (Ting Shen/The Dallas Morning News via AP)
A Dallas Area Rapid Transit police officer receives comfort at the Baylor University Hospital emergency room entrance Thursday, July 7, 2016, in Dallas. Police say one rapid-transit officer has been killed and three injured when gunfire erupted during a protest in downtown Dallas over recent fatal shootings by police in Louisiana and Minnesota. (Ting Shen/The Dallas Morning News via AP)

DALLAS (AP) — A day after five officers were shot to death at a protest march, Dallas authorities said Friday that a man suspected in the slayings had been upset about police shootings of two black men earlier this week and wanted to kill whites, “especially white officers.”

The man was chased into a parking garage, where he exchanged fire with officers, who later killed him with a robot-delivered bomb, Police Chief David Brown said. But before his death, he described his motive during negotiations, according to the chief.

The confrontation followed the deadliest day for U.S. law enforcement since the Sept. 11, 2001, terrorist attacks.

Brown blamed “snipers” for Thursday’s attack, but it was unclear how many shooters were involved. Authorities initially said three suspects were in custody and the fourth dead. Hours later, officials were vague and would not discuss details.

Before dying, the police chief said, the suspect also stated that he acted alone and was not affiliated with any groups, Brown said.

Law enforcement officials did not immediately disclose the race of the suspect or the dead officers.

The bloodshed unfolded just a few blocks from where President John F. Kennedy was slain in 1963.

The shooting began about 8:45 p.m. Thursday while hundreds of people were gathered to protest the killings in Baton Rouge, Louisiana, and suburban St. Paul, Minnesota. Brown told reporters that snipers fired “ambush-style” on the officers. Two civilians also were wounded.

Authorities said they were not sure they had located all possible suspects, but attention on Friday quickly turned to the man killed in the parking garage.

A Texas law enforcement official identified him as Micah Johnson, 25.

The official spoke on the condition of anonymity because he said he was not authorized to release the information. There were no immediate details on the suspect’s middle name or hometown.

By midday, investigators were seen walking in and out of a home believed to be Johnson’s in the Dallas suburb of Mesquite.

The Army said Johnson served in the Army Reserve from March 2009 to April 2015 and did one tour in Afghanistan. He was a private first class with a specialty in carpentry and masonry. His Afghanistan deployment spanned from November 2013 to July 2014.

None of the other suspects was identified, and the police chief said he would not disclose any details about them until authorities were sure everyone involved was in custody.

The nation’s top law enforcement official, Attorney General Loretta Lynch, called for calm, saying the recent violence can’t be allowed to “precipitate a new normal.”

Lynch said protesters concerned about killings by police should not be discouraged “by those who use your lawful actions as a cover for their heinous violence.”

It appeared the shooters “planned to injure and kill as many officers as they could,” Brown said.

Video from the scene showed protesters marching along a downtown street about half a mile from City Hall when shots erupted and the crowd scattered, seeking cover. Officers crouched beside vehicles, armored SWAT team vehicles arrived and a helicopter hovered overhead.

Demonstrations were held in several other U.S. cities Thursday night to protest the police killings of two more black men: A Minnesota officer on Wednesday fatally shot Philando Castile while he was in a car with a woman and a child, and the shooting’s aftermath was livestreamed 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.

The Dallas shootings occurred in an area of hotels, restaurants, businesses and some residential apartments only a few blocks from Dealey Plaza, the landmark made famous by the Kennedy assassination.

The scene was chaotic, with 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 shooters “were strategic. It was tap, tap, pause. Tap, tap, pause,” he said.

Brown said the suspects “triangulated” in the downtown area where the protesters were marching and had “some knowledge of the route” they would take.

Video posted on social media appeared to show a gunman at ground level exchanging fire with a police officer who was then felled.

Mayor Mike Rawlings said one of wounded officers had a bullet go through his leg as three members of his squad were fatally shot around him.

“He felt that people don’t understand the danger of dealing with a protest,” said Rawlings, who spoke to the surviving officer. “And that’s what I learned from this. We care so much about people protesting, and I think it’s their rights. But how we handle it can do a lot of things. One of the things it can do is put our police officers in harm’s way, and we have to be very careful about doing that.”

Few details about the slain officers were immediately available.

Four of the dead were with the Dallas Police Department, a spokesman said. One was a Dallas Area Rapid Transit officer. The agency said in a statement that 43-year-old officer Brent Thompson, a newlywed whose bride also works for the police force, was the first officer killed in the line of duty since the agency formed a police department in 1989.

“Our hearts are broken,” the statement said.

Theresa Williams said one of the wounded civilians was her sister, 37-year-old Shetamia Taylor, who was shot in the right calf. She threw herself over her four sons, ages 12 to 17, when the shooting began.

Other protests across the U.S. on Thursday were peaceful, including in New York, Atlanta, Chicago and Philadelphia. In Minnesota, where Castile was shot, hundreds of protesters marched in the rain from a vigil to the governor’s official residence.

President Barack Obama said America is “horrified” by the shootings, which have no possible justification. He called them “vicious, calculated and despicable.”

Speaking from Warsaw, Poland, where he was meeting with leaders of the European Union and attending a NATO summit, the president asked all Americans to pray for the fallen officers and their families.