By Terry Wallace

Associated Press

DALLAS — Five police officers were fatally shot and seven others wounded during a protest over fatal police shootings of black men in other states, authorities said. It was the deadliest day for U.S. law enforcement since the 2001 terrorist attacks.

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)

Thursday's bloodshed, which unfolded just a few blocks from where President John F. Kennedy was slain in 1963, also evoked the trauma of the nation's tumultuous civil rights era.

Police Chief David Brown blamed "snipers," but it was unclear how many shooters were involved. Authorities initially said three suspects were in custody and a fourth dead.

Police were not sure they had located all possible suspects, but by Friday attention was focusing on a man who was killed by law enforcement with a robot-delivered bomb in a parking garage where he had exchanged fire with officers.

Authorities resorted to the bomb after hours of negotiations failed, Brown said.

Before dying, the police chief said, the suspect declared to officers that he was upset about recent shootings and wanted to kill whites, "especially white officers."

The suspect also said he was not affiliated with any groups and stated that he acted alone, Brown added.

None of the 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 shooting began about 8:45 p.m. Thursday while hundreds of people were gathered to protest the week's fatal police shootings in Baton Rouge, Louisiana, and suburban St. Paul, Minnesota. Brown told reporters the snipers fired "ambush-style" on the officers. Two civilians were also wounded.

Brown said it appeared the shooters "planned to injure and kill as many officers as they could."

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."

Early Friday morning, dozens of officers filled the corridor of the emergency room at Baylor Medical Center, where other wounded officers were taken. The mayor and police chief were seen arriving there.

Four of the officers who were killed 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 had thrown herself over her four sons, ages 12 to 17, when the shooting began.

Texas Gov. Greg Abbott directed the Texas Department of Public Safety to offer "whatever assistance the City of Dallas needs."

"In times like this we must remember — and emphasize — the importance of uniting as Americans," Abbott said.

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.

The National Law Enforcement Officers Memorial Fund, which tracks on-duty deaths, said the fatal shootings made Thursday the deadliest day for U.S. police since Sept. 11.

___

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.