Seven other police officers and two civilians were wounded in the ambush in downtown Dallas on Thursday night, officials said. Police killed the gunman, identified by a U.S. government source as Micah Xavier Johnson, with a bomb-carrying robot after cornering him in a parking lot, ending an hours-long standoff.
The sound of gunfire from a high-powered rifle sent a panicked crowd of hundreds of protesters screaming and running for their lives near the end of a march to protest police killings of black men this week in Minnesota and Louisiana. Police officers at the time believed they were under attack by several gunmen in multiple locations.
The Louisiana and Minnesota shootings, both now the subject of federal investigations, were the latest in a series of police killings that have triggered protests over police use of force against black suspects and racial disparities in the American criminal justice system.
Black Lives Matter, a decentralized movement, arose after those killings to protest the treatment of black people by U.S. law enforcement.
"This was a well-planned, well-thought-out, evil tragedy by these suspects. And we won't rest until we bring everyone involved to justice," Dallas Police Chief David Brown said. "We are determined to not let this person steal this democracy from us."
During lengthy negotiations with police, the gunman told reporters he was angry about the Louisiana and Minnesota killings, Brown told reporters.
"The suspect said he was upset about Black Lives Matter," said Brown, who is black. "The suspect said he was upset at white people. The suspect stated that he wanted to kill white people, especially white officers."
Johnson was a member of the group "Black Panther Party Mississippi" on Facebook, which has over 200 members. Earlier this month he shared a video showing what he described as white people killing what looked like dolphins or whales.
"Look at the joy on their faces. Why do so many whites (not all) enjoy killing and participating in the death of innocent beings," Johnson wrote. Its authenticity could not be immediately confirmed.
'HEARTACHE AND DEVASTATION'
Authorities said that the gunman fired at least some of the shots in the attack but have not ruled out that other shooters were involved. Details on how the shootings unfolded remained unclear. It also was not clear how one person could have shot so many officers, though video of the attack taken by a witness shows a gunman carrying an assault-style weapon and carrying large amounts of ammunition.
The video shows a man with a rifle crouching at ground level and charging at and then shooting another person who appeared to be wearing a uniform. That person then collapsed to the ground.
Reuters could not immediately confirm the authenticity of the video.
It was the deadliest day for police in the United States since the Sept. 11, 2001, attacks.
The U.S. Army said Johnson had served as a private first class in the Army Reserve, made up of part-time soldiers, and was deployed to Afghanistan from November 2013 to July 2014. It said Johnson served from March 2009 to April 2015 and was a carpentry and masonry specialist with the 420th Engineering Brigade based in Texas.
President Barack Obama called the shooting "a vicious, calculated and despicable attack on law enforcement." Obama, who was in Poland for a NATO summit and has been stymied by the Republican-led Congress in his bid for new gun control laws, added, "We also know when people are armed with powerful weapons unfortunately it makes attacks like these more deadly and more tragic."
Three of the slain officers were identified on Friday. One was Brent Thompson, 43, who joined the Dallas Area Rapid Transit police department in 2009, according to police. Another was Patricio Zamarripa, 32, an U.S. Navy veteran, according to his family. Also killed was Michael Krol, 40, according to the Wayne County Sheriff's Office in Michigan, where he used to work.
Reverend Jeff Hood, an organizer of Thursday night's protest in Dallas, said he had been chatting with some of the police officers on the street when gunfire erupted.
"I saw what I believe were two police officers that went down. I didn't know what to do," Hood told reporters on Friday. "If we continue to turn to violence, we are going to continue to see heartache and devastation."
A string of killings of black men and boys by police in cities including Ferguson, Missouri, New York, Baltimore, Chicago, Cleveland, Tulsa, Oklahoma and North Charleston, South Carolina gave rise to the Black Lives Matter movement against excessive police force.
A Twitter account describing itself as representing the Black Lives Matter movement sent the message: "Black Lives Matter advocates dignity, justice and freedom. Not murder."
Police in Dallas said they were questioning two occupants of a Mercedes they had pulled over after seeing a man throwing a camouflage bag inside the back of the vehicle, which then sped off on a downtown street. A woman was also taken into custody near the garage where the standoff took place.
The Dallas shootings happened as otherwise largely peaceful protests unfolded around the United States after the police shooting of Philando Castile, a 32-year-old black man, on Wednesday during a traffic stop near St. Paul, Minnesota.
The day earlier, police in Baton Rouge, Louisiana, shot dead Alton Sterling, 37, while responding to a call alleging he had threatened someone with a gun.
Both killings were captured on video, with Castile's girlfriend broadcasting the bloody aftermath of his shooting live on the internet.
Cleveland police officials have tightened their security plan for the July 18-21 Republican National Convention as a result of the shootings of in Dallas, Deputy Police Chief Ed Tomba said.