Updated

Texas Sen. Ted Cruz offered his condolences and praised the bravery of Dallas police officers after snipers opened fire on police in the heart of Dallas, killing five officers and injuring seven others during protests over two recent fatal police-involved shootings of black men.

Two civilians were also injured and remain hospitalized.

“The men and women of the Dallas Police Department and the officers of Dallas Area Rapid Transit (DART) selflessly run into harm’s way to protect the lives of others," Cruz said in a statement. "Tonight, we mourn the loss of four of their brothers. Our thoughts and prayers go out to these officers and their families, and to those who have been injured."

Cruz added that his office is in contact with authorities in Dallas and has offered to provide whatever support possible to help in "assisting the victims and bringing the perpetrators to justice."

Three people are in custody and a fourth suspect died in a confrontation with police in a parking garage downtown, Dallas Police Chief David Brown said early Friday morning.

The suspect had told negotiators he intended to hurt more law enforcement officials, the chief said.

The gunfire broke out around 8:45 p.m. Thursday while hundreds of people were gathered to protest fatal police shootings this week in Baton Rouge, Louisiana, and suburban St. Paul, Minnesota. Brown told reporters the snipers fired "ambush style" upon the officers. Mayor Mike Rawlings said one member of the public was wounded in the gunfire.

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

Video footage from the Dallas scene showed protesters were marching along a street in downtown, about half a mile from City Hall, when the shots erupted and the crowd scattered, seeking cover.

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

The attacks made Thursday the deadliest day in U.S. law enforcement history since the Sept. 11, 2001, terrorist attacks, according to The National Law Enforcement Officers Memorial Fund, which tracks on-duty officer deaths.

The search for the shooters 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. Some of the injured officers were taken to Parkland Hospital.

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 shooters "were strategic. It was tap, tap pause. Tap, tap pause," he said.

Brown said police don't have a motivation for the attacks or any information on the suspects. He said they "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.

Authorities have not determined whether any protesters were involved with or were complicit in the attack and were not certain early Friday that all suspects have been located, Brown said.

One woman was taken into custody in the same parking garage where the standoff was ongoing, Brown said. Two others were taken into custody during a traffic stop.

Rawlings said at the news conference that authorities will likely ask some people to stay away from downtown Dallas on Friday.

"This is still an active crime scene. We're determining how big that crime scene is," the mayor said.

A map will be posted online showing an area where people should avoid on Friday, he said.

Early Friday morning, there were dozens of officers of the corridor of the ER at Baylor Medical Center, where other injured 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 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 told The Associated Press that the injured civilian was her sister, 37-year-old Shetamia Taylor.

Williams said her sister was at the protests Thursday night with her four sons, ages 12 to 17.

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

Texas Gov. Greg Abbott released a statement saying he has directed the Texas Department of Public Safety director to offer "whatever assistance the City of Dallas needs at this time."

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

President Barack Obama said America is "horrified" over the shootings and there's no possible justification for the attacks.

Speaking from Warsaw, Poland, where he's meeting with leaders of the European Union and attending a NATO summit, the president said justice will be done and he's asking all Americans to pray for the fallen officers and their families. He also said the nation should express its gratitude to those serving in law enforcement.

People on Dallas' tense, police-filled streets early Friday struggled to fathom the situation.

"I think the biggest thing that we've had something like this is when JFK died. It's like, shut the city down, downtown like this, it's surreal to me," said city native Jalisa Jackson, who said she was scared. "I mean we're all out, everyone's trying to get answers, find people, find loved ones and we kind of don't, we kind of, like, don't even know what's going on."

The Associated Press contributed to this report.

Like us on Facebook
Follow us on Twitter & Instagram