Five Dallas police officers have been killed and six wounded by gunmen during protests against the shooting of black men by police, authorities say.
Three people are in custody and one man who was in a stand-off with police shot himself dead, US media have reported.
Gunfire broke out at around 20:45 local time on Thursday (01:45 GMT Friday) as demonstrators marched through the city.
The protests were sparked by the deaths of Philando Castile in Minnesota and Alton Sterling in Louisiana.
The Dallas attack marks the deadliest toll on US law enforcement officers since the 9/11 attacks in 2001.
Dallas Police Chief David Brown said officers had surrounded a car park near El Centro College, where an armed man was firing off rounds with a rifle.
He said the suspect had told negotiators that “the end is coming” and that he was going to attack more officers and had “bombs all over the place”.
But US media say the man is now dead from a self-inflicted gunshot wound and the stand-off is over, although the police have yet to confirm this.
Police are continuing to sweep the downtown area.
Chief Brown said that a woman who was in the vicinity of the suspect was now being questioned.
Police also said officers had intercepted a car after a person threw a camouflaged bag into the back and sped off. Two occupants were being questioned.
Chief Brown said the suspects were all believed to have been working together, using rifles to carry out attacks while the rally was taking place.
He added: “We do not have a comfort level that we have all the suspects.”