DALLAS • Five police officers were killed and seven wounded in a sniper attack in downtown Dallas, in a shocking escalation of racially motivated violence in the United States.
The attack on Thursday night came during one of several protests across the country against the killing of two black men by white police officers this week.
There was heavy police presence during the march in Dallas, which began peacefully.
President Barack Obama, who was travelling in Poland, condemned the violence against police. "We still don't know all of the facts. What we do know is that there has been a vicious, calculated and despicable attack on law enforcement," he said.
Police described the sniper ambush as carefully planned, with some shots apparently fired from rooftop positions.
They said they had taken three people into custody before killing a fourth with a robot-controlled bomb after a long stand-off in a downtown garage.
"We had an exchange of gunfire with the suspect. We saw no other option but to use our bomb robot," Dallas police chief David Brown told reporters at City Hall.
"He said he was upset about the recent police shootings. The suspect said he was upset at white people. The suspect stated he wanted to kill white people, especially white officers."
While talking to police negotiators, the suspect said he was not affiliated with any group and acted alone.
But at an earlier news conference, the police chief said four people armed with rifles were believed to have carried out the attacks. They were thought to have positioned themselves in triangulated locations near the end of the route that the protesters planned to take.
US media outlets identified the suspect who died in the stand-off as 25-year-old Micah Johnson, a Texas resident.
It was the deadliest day for police in the US since the Sept 11, 2001 attacks, and the attack appeared likely to further strain already tense race relations in the country.
Witnesses said shots rang out as the protest in Dallas was winding down, sending marchers screaming and running in panic through the city's streets.
A total of 12 police officers and two civilians were shot during the attack, Dallas Mayor Mike Rawlings said. Three of the officers who were shot were women, he said.
Mr Rawlings said the people in custody, including one black woman, were "not being cooperative" with police investigators.
Police said the suspect who was in the stand-off also said there were bombs in the garage where he was holed up, as well as in other places downtown.
After conducting sweeps, police said they found no explosives. Parts of downtown Dallas were closed off for hours, with no bus or rail service and flight restrictions.
As officials called for calm and unity, Mr Obama said that anger over issues of race was no grounds for violence.
"Let's be clear: There's no possible justification for these kinds of attacks, or any violence against law enforcement," he said.
REUTERS, NEW YORK TIMES, AGENCE FRANCE-PRESSE