Dallas detectives on Saturday were still piecing together a picture of Micah Xavier Johnson and whether he acted alone in his ambush of police or had allies in preparing for the shooting that took five lives.

Authorities have said they believe Johnson was the sole gunman during the Thursday Black Lives Matter protest in Dallas. What is unclear is whether the 25-year-old army veteran, whom some people described as a loner, had conspired with others or how long he had been planning an attack.

The shootings came amid a protest over the fatal police shootings of two black men in Louisiana and Minnesota this week. Similar protests — mostly peaceful — were held Friday in dozens of cities across the United States, and more are planned for Saturday.

Investigation continues

Police searched Johnson’s Mesquite, Texas, home Friday and found bomb-making materials, ballistic vests, rifles, ammunition and a personal journal of combat tactics. They are analyzing the information in the journal, police said in a statement.

Johnson told negotiators “he wanted to kill officers, and he expressed killing white people, he expressed killing white officers” and “expressed anger for Black Lives Matter,” Dallas Police Chief David Brown said Friday.

It was unclear what Johnson meant when he referred to the protest movement — whether he was angry at it for being too peaceful or simply angry at the controversial police shootings that had sparked it.

Police initially believed multiple gunmen took part in Thursday attack

Investigators determined Johnson was “the lone shooter in this incident,” Dallas Mayor Mike Rawlings said, confirming what federal officials had told CNN.

“This was a mobile shooter who had written manifestos on how to shoot and move, shoot and move, and that’s what he did,” Rawlings said at a news conference.

“As we’ve started to unravel this fishing knot, we’ve come to realize this shooting came from one building at different levels.”

Rawlings said investigators’ initial confusion about the number of shooters was partly because about 20 protesters wearing protective vests and carrying rifles scattered when the shooting started.

Authorities said three suspects were in custody earlier Friday, but later told CNN they had been questioned and released.

‘Well-planned’ attack

Brown said Friday the investigation so far showed “that this was a well-planned, well-thought-out, evil tragedy,” he said.

The deadly gunfire erupted in Dallas after videos showing fatal police encounters with two African-American men in Louisiana and Minnesota spurred protests and debate over police use of force across the country.

Five police officers were killed and seven others wounded in the ambush. It was the deadliest single incident for U.S. law enforcement since September 11, 2001. Two civilians were also hurt, the Dallas mayor’s office said.

Brown said as the standoff with Johnson continued, authorities “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.”

“Other options would have exposed our officers to grave danger,” the chief said. “The suspect is deceased as a result of detonating the bomb.”

Who was Micah Xavier Johnson?

Johnson had no criminal record or known terror ties, a law enforcement official said.

He served in the U.S. Army Reserve from March 2009 to April 2015, training as a carpentry and masonry specialist, according to Pentagon records. Johnson was deployed for about seven months in Afghanistan, from late 2013, and received an honorable discharge.

In the spring of 2014, during his tour in Afghanistan, a female soldier accused Johnson of sexual harassment, according to attorney Bradford Glendening, who represented Johnson in the case.

The attorney described the administrative complaint as “sort of a hostile work environment” case, and told CNN the accuser asked that she be granted a protective order against Johnson that would include herself, her family, her residence and her place of work, and asked that Johnson get some mental help.

The Army instituted an administrative proceeding in which Johnson would be dismissed with an “other than honorable discharge,” Glendening said, but in September 2014 Johnson waived his right to a hearing and asked for the discharge to be upgraded.

In April 2015, the Army said, Johnson received an honorable discharge.

An Army spokeswoman did not have any immediate comment about the sexual harassment allegation against Johnson, which was first reported by The New York Times.

Johnson’s neighbor, Wayne Bynoe, said police cars were outside his home Friday. Johnson lived with his mother and kept to himself, Bynoe said.

Johnson had at least two weapons with him — a rifle and a handgun, two law enforcement officials said.

One of the officials, familiar with the latest information from the Dallas police investigation, said the rifle was an SKS semi-automatic. The other official said Johnson legally bought multiple firearms in the past.

The attack

Witnesses said protesters were marching peacefully in downtown Dallas when the gunfire started Thursday night.

The Rev. Jeff Hood, one of the protest organizers, said he saw two officers go down, then watched a sergeant running toward the gunfire.

“I ran the opposite direction. I was concerned about the 700 or 800 people behind me,” he said. “I was screaming, ‘Run! Run! Active shooter! Run!’ And I was trying to get folks out as fast as I could.”

Crowds ran into a parking garage, witnesses said, and spilled out after word spread a sniper was nearby.

Police initially said at least two snipers fired “ambush-style” from an “elevated position” before they exchanged gunfire and negotiated with a suspect, later identified as Johnson, for hours at a parking garage in downtown Dallas.

Before authorities killed him with an explosive, Johnson told negotiators more officers were going to get hurt, and that bombs were planted all over downtown.

Police found no explosives during sweeps of the area, Dallas Police Maj. Max Geron said.

The victims

The five slain officers were identified on Friday.

Dallas Police Officers Lorne Ahrens, a 14-year veteran of the department, and Michael Smith, a 27-year veteran, were both killed, according to local media reports and Smith’s sister, who spoke to CNN affiliate KFDM.

CNN affiliate WDIV said Dallas officer Michael Krol was killed. The remaining two were Dallas officer Patrick Zamarripa and DART Police officer Brent Thompson.

Police have said at least 10 officers were shot by a sniper and one officer was shot in a shootout at the parking garage. It’s not clear where the 12th officer was shot.

A few of the wounded officers remain hospitalized, police said. Brown called for the community to support them.

“We don’t feel much support most days. Let’s not make today most days,” Brown said. “Please, we need your support to be able to protect you from men like these, who carried out this tragic, tragic event.”

Other shootings of police

Three other shootings endangered police around the same time.

In Bristol, Tennessee, a man opened fire on motorists early Thursday at a motel and along the Volunteer Parkway, killing a woman and wounding three people, including a police officer, the Tennessee Bureau of Investigation said.

The TBI said a preliminary investigation reveals the suspect, Lakeem Keon Scott, 37, may have targeted individuals and officers after being troubled by recent incidents involving African-Americans and law enforcement officers in other parts of the country. Witnesses said they heard someone yell, “Police suck! Black lives matter!” before bullets were fired, the TBI said.

Scott was wounded by police, arrested and questioned at a hospital, the TBI said.

In the St. Louis area, a police officer was shot in the back of the neck Friday morning by a suspect stopped for a speeding violation, Ballwin Police Chief Kevin Scott said. The officer was walking back to his patrol car when the suspect ran toward him, firing three shots from a semi-automatic handgun, Scott said. The suspect was arrested and the officer was in critical condition, Scott said.

In Valdosta, Georgia, a police officer was shot Friday morning by a man who placed a 911 call, the Georgia Bureau of Investigation said. The officer, who is now in stable condition, went to an apartment complex to check on a reported car break-in and was shot twice when he exited his patrol vehicle, the GBI said.

The officer returned fire and wounded the shooter, who was identified as the caller and arrested. The GBI said there was no connection to the Dallas shooting.

A number of police departments across the country, including Chicago, Philadelphia and Cincinnati, decided that officers should be paired-up for an indefinite period. Chicago police said the move was made “to increase visibility and strengthen officer safety.”

Man shot in Houston Saturday morning

Houston police reported that two officers shot and killed a man with gun after they encountered him standing in the middle of the street armed with a revolver at approximately 12:40 a.m. CT.

The officers stopped their patrol car, exited and gave multiple commands for the man to drop the weapon, Houston police spokeswoman Jodi Silva said in a news conference.

A witness also told the man to “put the weapon down, put the weapon down,” Silva said.

The officers continued to talk to the man when he pointed the weapon in the air but shot and killed him when he pointed the weapon in their direction, she added.

The man, who has not been identified publicly, was found to be in possession of that revolver and there “are a number of witnesses” to the shooting, Silva said.

The man’s race was not immediately confirmed.

The protests

The shootings occurred as many Americans nationwide took to the streets to demand answers over the killings of two black men by police in two days.

In Minnesota, crowds gathered near the spot where an officer killed Philando Castile in a car Wednesday.

Hundreds of miles away, protesters marched outside a convenience store in Baton Rouge, Louisiana, where Alton Sterling was fatally shot Tuesday while police tackled him in a parking lot.

Minnesota shooting

In Minnesota, the shooting of Castile was remarkable — and heartbreaking — because his fiancée streamed the immediate aftermath live on Facebook.

As her 4-year-old sat in the back seat, Diamond Reynolds calmly narrated what was going on and showed viewers the dying man groaning and bleeding in the front seat.

Castile, a school cafeteria supervisor, was shot when a police officer pulled him over in Falcon Heights, Minnesota, because of a broken taillight, said Reynolds, who was in the car with him.

“He let the officer know that he had a firearm and he was reaching for his wallet and the officer just shot him in his arm,” she said as she broadcast the Wednesday shooting on Facebook.

“Oh God, please don’t tell me my boyfriend is dead,” she said.

Falcon Heights contracts with the City of St. Anthony Park for police services. Friday, Black Lives Matter held a new conference and called for Falcon Heights to terminate that contract.

The attorney for Officer Jeronimo Yanez, who shot Castile, said the “tragic incident had nothing to do with race and everything to do with the presence of a gun.

“Regrettably, the use of force became necessary in reacting to the actions of the driver of a stopped vehicle. Officer Yanez is deeply saddened for the family and loved ones of Philando Castile,” said attorney Thomas M. Kelly in a statement Saturday.

Baton Rouge shooting

Sterling, 37, was killed Tuesday near a convenience store in Baton Rouge, where he regularly sold CDs and DVDs.

A homeless man approached Sterling and asked for money, becoming so persistent that Sterling showed him his gun, a source told CNN.

The homeless man called 911 and police arrived at the store. Police tackled Sterling to the ground, and shot him several times, video shows.

A law enforcement source told CNN that the officers pulled a gun from Sterling’s body at the scene. No further details were provided on the type of firearm.

The convenience store quickly became the site of protests. Flowers and signs piled up in a makeshift memorial. Protesters chanted “Hands up, don’t shoot,” the line made famous in the Michael Brown shooting in Ferguson, Missouri, about two years ago. Brown was also shot by a police officer.