Snipers have opened fire on police officers in Dallas, killing five and injuring several others during protests over two recent fatal police shootings of black men, police said.
Three people are in custody and police were negotiating with a suspect in a parking garage who was exchanging gunfire with officials, Dallas Police Chief David Brown said early on Friday morning.
The suspect is not co-operating and has told negotiators he intends to hurt more law enforcement officials, Mr Brown said.
Dallas Police Department said: “It has been a devastating night. We are sad to report a fifth officer has died.”
The gunfire started at around 8.45pm local time on Thursday while hundreds of people were gathered to protest over fatal police shootings this week in Baton Rouge, Louisiana, and suburban St Paul, Minnesota.
Mr Brown told reporters the snipers fired on the officers “ambush style” from “elevated positions”.
Mayor Mike Rawlings said one member of the public was wounded in the gunfire.
Protests were also held in several other cities across the country on Thursday night after a Minnesota officer shot Philando Castile dead while he was in a car with a woman and a child on Wednesday. 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 video on a mobile phone.
Video footage from the Dallas scene showed protesters marching along a street about half a mile from City Hall, when the shots broke out and the crowd scattered, seeking cover.
Mr Brown said that it appeared the gunmen “planned to injure and kill as many officers as they could”.
The search for the snipers stretched throughout the city centre, an area of hotels, restaurants, businesses and some residential apartments. 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.”
A woman was taken into custody in the same parking garage where the stand-off was continuing, Mr Brown said. Two other people were taken into custody during a traffic stop.
Mr Brown said police did not have a motive for the attacks or any information on the suspects.
He said they “triangulated” in the area where the protesters were marching and had “some knowledge of the route” they would take. He said authorities have not determined whether any protesters were involved with or were complicit in the attack.
Police were not certain early on Friday whether all the suspects have been located, Mr Brown added.
Dallas police said a person of interest whose picture had been circulated had turned himself in.
Police earlier had circulated a picture of a man in a camouflage T-shirt who was carrying a long gun.
A man who identified himself as the man’s brother said his sibling was not one of the gunmen. He told television station KTVT that, once the shootings had started, his brother had handed the gun over to a police officer.
The FBI’s Dallas division is providing “all possible assistance”, spokeswoman Allison Mahan said.
Local resident Carlos Harris said the gunmen “were strategic. It was tap, tap pause. Tap, tap pause.”
Demonstrator Brittaney Peete told the Associated Press that she did not hear the gunshots, but she “saw people rushing back toward me saying there was an active shooter”.
She said she saw a woman trip over and nearly get trampled.
Late on Thursday, Dallas police in uniform and in plain clothes were standing behind a police line at the entrance to the emergency room at Baylor Medical Centre in Dallas. It was unclear how many injured officers were taken there. Hospital spokeswoman Julie Smith had no immediate comment.
Three of the officers who were killed were with the Dallas Police Department. One was a Dallas Area Rapid Transit officer.
Texas Governor 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 emphasise – the importance of uniting as Americans,” Mr Abbott said.
Other protests across the US 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 Mr 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.