DALLAS — The heavily armed sniper who gunned down police officers in downtown Dallas, leaving five of them dead, specifically set out to kill as many white officers as he could, officials said Friday. He was a military veteran who had served in Afghanistan, and he kept an arsenal in his home that included bomb-making materials.
The gunman turned a demonstration against fatal police shootings this week of black men in Minnesota and Louisiana from a peaceful march focused on violence committed by officers into a scene of chaos and bloodshed aimed against them.
The shooting was the kind of retaliatory violence that people have feared through two years of protests around the country against deaths in police custody, forcing yet another wrenching shift in debates over race and criminal justice that had already deeply divided the nation.
Demonstrations continued Friday in cities across the country, with one of the largest taking place on the streets of Atlanta, where thousands of people protesting police abuse brought traffic to a standstill.
Jeh Johnson, the Homeland Security secretary, said in New York that there was apparently just one sniper, though there were so many gunshots and so many victims that officials at first speculated about multiple shooters.
Officials said they had found no evidence that the gunman, Micah Johnson, 25, had direct ties to any protest or political group, either peaceful or violent, but his Facebook page showed that he supported the New Black Panther Party, a group that has advocated violence against whites, and Jews in particular.
Searching the killer’s home on Friday, “detectives found bomb-making materials, ballistic vests, rifles, ammunition, and a personal journal of combat tactics,” the Dallas Police Department said in a statement.
Three other people were arrested in connection with the shooting, but the police would not name them or say why they were being held.
In addition to the five officers who died, seven officers and two civilians were wounded. The Police Department said that 12 officers had returned fire during a wild series of gun battles that stretched for blocks.
After the shooting subsided, Mr. Johnson, wielding an assault rifle and a handgun, held the police off for hours in a parking garage, claiming — apparently falsely — to have planted explosives in the area, and threatening to kill more officers. In the end, the police killed him Friday morning with an explosive delivered by a remote-controlled robot, the Dallas police chief, David O. Brown, said.
During the standoff, Mr. Johnson, who was black, told police negotiators that “he was upset about Black Lives Matter,” Chief Brown said. “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.”
He refused to rule out the possibility that more people were involved, saying, “We’re not satisfied that we’ve exhausted every lead.”
Mr. Johnson, who lived in the Dallas area, served as a private in the Army Reserve from March 2009 to April 2015, according to records released by the Pentagon. He was listed as a carpentry and masonry specialist, and served in Afghanistan from November 2013 to July 2014.
The sequence of events this week provoked anger and despair, dealing blows both to law enforcement and to peaceful critics of the police, who have fended off claims that the outcry over police shootings foments violence and puts officers’ lives in danger.
“All I know is that this must stop, this divisiveness between our police and our citizens,” Chief Brown said.
Just hours after President Obama, reacting to video recordings of the shootings in Baton Rouge, La., and Falcon Heights, Minn., spoke in anguished terms about the disparate treatment of the races by the criminal justice system, he felt compelled to speak again, this time about the people who attacked officers.
“We will learn more, undoubtedly, about their twisted motivations, but let’s be clear: There are no possible justifications for these attacks or any violence towards law enforcement,” he told reporters Friday morning in Warsaw, where he was attending a NATO summit meeting, after speaking by phone with Mayor Mike Rawlings of Dallas.
The White House said Mr. Obama would travel to Dallas early next week, at the invitation of the city’s mayor. Later in the week, the president will host a discussion between the police and community leaders to help find solutions to racial disparities and ways to better support police, aides said.
Attorney General Loretta E. Lynch, who was in Washington, said that the week’s violence had left many people with a justifiable “sense of helplessness, of uncertainty and of fear,” but that “the answer must not be violence.”
“To our brothers and sisters who wear the badge, I want you to know that I am deeply grateful for the difficult and dangerous work that you do every day to keep our streets safe and our nation secure,” she said. To the protesters, she said, “Do not be discouraged by those who would use your lawful actions as a cover for their heinous violence.”
But William Johnson, executive director of the National Association of Police Organizations, appearing on Fox News, said that there was “a war on cops,” and that the Obama administration was to blame for appeasement of those who attack the police.
The attack appeared to be the deadliest for law enforcement officers in the United States since Sept. 11, 2001.
“Our profession is hurting,” Chief Brown said, calling the actions of his officers nothing short of heroic. “Dallas officers are hurting. We are heartbroken. There are not words to describe the atrocity that occurred to our city.”
The shooting erupted just before 9 p.m., only a few blocks from Dealey Plaza, where President John F. Kennedy was assassinated in 1963. It cut short an emotional but peaceful demonstration, unleashing chaos as terrified marchers, including families with children, ran for cover, while police officers ran toward the shooting, guns drawn and firing back.
“I grabbed my shirt because I was close enough, I thought I might have been shot,” said Jeff Hood, a minister who took part in the march. “I was screaming, ‘Run, run!’”
Bystanders captured extraordinary video of the shootout on downtown streets, with officers taking shelter behind patrol cars and pillars, and tending to their fallen comrades, amid the boom of gunfire and the flash and glare of squad cars’ emergency lights.
The violence struck near one of the city’s busiest districts, filled with hotels and restaurants as well as county government buildings, and hundreds of people spent much of the night trapped in buildings that were placed on lockdown.
The dead included four officers of the Dallas city police, and one from Dallas Area Rapid Transit.
Jane E. Bishkin, a Dallas lawyer who represents five of the wounded officers, said that they were expected to recover, but that one of them, a woman, had suffered a serious injury to her left arm and might be disabled as a result.
After Mr. Johnson was cornered on the second floor of a parking garage, negotiators spent hours trying to get him to surrender, Chief Brown said, but he “told our negotiators that the end is coming and he’s going to hurt and kill more of us, meaning law enforcement, and that there are bombs all over the place in this garage and downtown.”
“The negotiations broke down, and we had an exchange of gunfire with the suspect,” the chief said. “We saw no other option but to use our bomb robot and place a device on its extension for it to detonate where the suspect was.”
The three other suspects were a woman who was taken from the garage and two others who were taken in for questioning after a traffic stop, but they were not providing much information, the chief said.
On Friday, a large part of downtown remained off limits to civilians as detectives, and agents from the F.B.I. and the Bureau of Alcohol, Tobacco, Firearms and Explosives, combed through the sprawling crime scene.
Chief Brown suggested that the gunman had some knowledge of the march route.
“How would you know to post up there?” he said. “We have yet to determine whether or not there was some complicity with the planning of this, but we will be pursuing that.”
But Dominique R. Alexander, a minister and head of the Next Generation Action Network, who said he had planned the march, said his group did not condone any violence.
“I was right there when the shooting happened,” he said. “They could have shot me.”