What to Know Twelve police officers were shot in ambush attack. Five were killed.

Two civilians were also injured in the shootings.

Police identified lone gunman as 25-year-old Micah Xavier Johnson.

Five officers are dead — four Dallas police officers and one Dallas Area Rapid Transit officer — in what authorities called a sniper ambush on police officers at the end of a peaceful protest against nationwide officer-involved shootings Thursday night.

Seven officers and two civilians were also injured in the shootings. All are expected to recover.

"This is a terrible blow to the city of Dallas. This is a terrible blow to the United States of America," Dallas Mayor Mike Rawlings said on NBC's "Today" show Friday morning.

Dallas Police Chief David Brown said Friday officers cornered a suspect — later identified as Micah Xavier Johnson, of Mesquite — and tried to negotiate with him for several hours before talks broke down. Johnson told police he was upset by recent police shootings and "wanted to kill white people."

After an exchange of gunfire, officers attached explosives to a bomb robot and detonated them near Johnson, killing him.

A protest against nationwide officer-involved shootings turns violent in Dallas’s downtown area. In the end, five police officers were killed by two men who were in sniping positions above ground, according to authorities. Another 6 officers were injured.

Brown said other options to bring the standoff to an end would have exposed more officers to grave danger.

Brown said before the standoff ended, Johnson told a hostage negotiator he was upset about recent shootings involving police officers and that he specifically wanted to kill white police officers. He added that he was not affiliated with any group, carried out the act alone and said police would eventually find the IEDs he claimed to have placed around the city.

Dallas police said during a search of Johnson's home Friday, detectives found bomb making materials, ballistic vests, rifles, ammunition and a personal journal of combat tactics.

Witness Cortney Washington and an unnamed woman tell NBC 5 what they saw after Dallas police officers were shot after a rally in Downtown Dallas Thursday night.

On Friday afternoon, multiple senior U.S. law enforcement officials said the investigation so far has led them to believe that Micah Xavier Johnson was the lone gunman. Mayor Rawlings later said that he was a lone, though mobile, gunman.

Police had initially said they believed there were two shooters. After the standoff ended, Brown gave no more details about a possible second shooter. Authorities had also said at one point that three suspects were in custody and a fourth dead.

But officials later said they believe Johnson acted alone. Sources told NBC News they have found no ties between Johnson and any extremist groups so far.

Rawlings said police swept the area where the standoff took place and investigated one suspicious package but found no explosives. Maj. Max Geron, with the Dallas Police Department, said on Twitter the area was cleared and crime scene investigators began processing the massive crime scene at about 6 a.m.

Dallas Police Chief David Brown and Mayor Mike Rawlings provide a 12:30 a.m. update on the shootings in downtown Dallas. During this second press conference, Rawlings confirmed that he heard from the White House and the Governor’s office.

"I'm not going to be satisfied until we turn over every stone," Brown said. "If there's someone out there associated with this, we will find you."

Rawlings called the shooting Dallas' "worst nightmare" and asked that all residents "come together and support our police officers." Brown reiterated that message Friday, asking for prayers and support from the community in the wake of the shootings.

Dallas police officers take cover after shots were fired during a protest of nationwide officer-involved shootings, July 8, 2016.

"We're hurting. Our profession is hurting. Dallas officers are hurting. We are heartbroken. There are no words to describe the atrocity that occurred to our city. All I know is that this must stop. This divisiveness between our police and our citizens,” Brown said. “We don't feel much support most days. Let's not make today most days. We need your support to be able to protect your from men like these."

Scores of Dallas and DART police officers arrived downtown following the shooting, which took place along Main Street between and Market and Lamar streets, a block from the Old Red Courthouse building just before 9 p.m. [[385947941,R]]

"I saw all the cops were bending over. There had to have been five or six cops, and they were all getting shot down. It was right after the rally, we were walking to the car," said Cortney Washington, of Dallas. "They kept shooting. It was coming — we didn't know where it was coming from. And I didn't see anybody else get shot. It was just the cops. I didn't see nobody else get shot."

Twelve officers in all — eight Dallas police and four DART — were shot by the gunman in the attack that began at 8:58 p.m., at the close of a rally in solidarity with two men killed in officer-involved shootings, one in Louisiana, one in Minnesota.

Dramatic Photos: Deadly Sniper Attack in Downtown Dallas

Video from the scene showed officers taking cover and people in the rally scattering after gunshots were heard.

One of the injured civilians was identified by family as Shetamia Taylor, who was shot while shielding her children from the gunfire, her sister told NBC 5. Taylor's condition is not known. A male victim was also injured in the shootings, according to City of Dallas spokeswoman Sana Syed. His identity and condition have not yet been released.

Missing Attachment Two of five Dallas police officers killed in shootings at a protest Thursday died after being transported Baylor University Medical Center.

One person was taken into custody at about 11:30 p.m., Dallas police said, following an exchange of gunfire with Dallas SWAT officers. A suspicious package was located near that person, and the package was being investigated by bomb squad personnel. Two other people were taken into custody in connection with a vehicle, Brown said.

Thursday's protest was organized by Dominique R. Alexander, an ordained minister and the head of the Next Generation Action Network, according to The New York Times. He told the Times the organization “does not condone violence against any human being, and we condemn anyone who wants to commit violence.”

Missing Attachment NBC 5’s Cory Smith, who was in downtown Dallas covering the rally, describes the scene during and after the shooting Thursday night.

Brown said it was too early to say whether there was a connection between the attackers and the demonstration.

“I was right there when the shooting happened,” Alexander added. “They could have shot me.”

Missing Attachment Police officers salute their fallen peers outside Parkland Memorial Hospital, where several officers were transported after shootings at a protest in Dallas.

Another rally organizer Cory Hughes told NBC 5 the protest was peaceful and as the crowd was dispersing, they heard gunfire. He said the scene turned into "mayhem; we didn't know where to go." He added he knew it was a serious situation when he saw officers coming from all directions, carrying rifles and tactical gear.

"They were shots ringing out from what felt like every direction," Hughes said.

The deceased DART officer was identified as 43-year-old Officer Brent Thompson. He is the first DART officer killed in the line of duty since the transit service formed a police department in 1989. He joined DART in 2009, according to a department statement.

Patrick Zamarripa, one of the Dallas police officers killed in the attack, served three tours of duty in Iraq as a Naval security officer. He was honored with the Iraq Campaign Medal, Global War on Terrorism Expeditionary Medal, and Global War on Terrorism Service Medal.

"He comes to the United States to protect people here," his father, Rick Zamarripa, told the Washington Post. "And they take his life."

Michael Krol worked for the Wayne County Sheriff's Office in Michigan from 2003 to 2007, before moving to Texas and joining the Dallas Police Department. The Wayne County Sheriff's Office identified him as a victim in Thursday's shooting.

"We are saddened by the loss of the dedicated officers in Dallas — one of whom was a former member of this agency — and also the wounding of the other officers," Sheriff Benny Napoleon said in a statement.

Michael J. Smith served with the Dallas Police Department for 28 years and was a seven-year U.S. Army veteran, according to police.

Lorne Ahrens served with the Los Angeles County Sheriff's Department for more than 10 years before joining the Dallas Police Department, and his former colleague, Capt. Merrill Ladenheim, said in an LASD Facebook post that "Lorne was a big guy with an even bigger heart."

Missing Attachment Five officers are dead – four Dallas police officers and one Dallas Area Rapid Transit officer – in what authorities called a sniper ambush on police officers at the end of a peaceful protest against nationwide officer-involved shootings Thursday night. Johnny Archer explains.

President Barack Obama, who was in Warsaw, Poland, for a NATO meeting, condemned the "vicious, callous and despicable attack."

"I believe I speak for every single American when I say that we are horrified over these events and that we stand united with the people and the police department in Dallas," the president said.

Obama has accepted an invitation from Rawlings to travel to Dallas "early next week," The White House announced Friday evening.

Gov. Greg Abbott offered the state's assistance to Dallas overnight and Obama pledged federal support.

Obama also ordered flags at the White House and all public buildings and grounds to be flown at half-staff.

Attorney General Loretta Lynch called for peace and calm in the wake of the attack, saying that violence is never the answer.

Lynch said Friday at the Justice Department in Washington that it has been a week of heartbreak and loss for the nation.

Lynch said the spate of violence can't be allowed to "precipitate a new normal." Calling the Dallas attack "an unfathomable tragedy," she said those concerned about suspect killings by police should not be discouraged "by those who use your lawful actions as a cover for their heinous violence."

Dallas County buildings, including the George L. Allen Sr. Courts building, were closed Friday, among several closures due to the ongoing police investigation. El Centro College was closed Friday and classes canceled due to the police investigation.

Portions of downtown Dallas will remain closed until at least Wednesday, July 13, while authorities continue to investigate.

The Bureau of Alcohol, Tobacco, Firearms, and Explosives; Federal Bureau of Investigation; U.S. Marshals; Homeland Security Investigations; Drug Enforcement Administration; Texas Department of Public Safety and Texas Rangers have joined the investigation, authorities said.

Dallas police at one point released a photo of a man whom they considered a "person of interest" in the shootings. The man, whose identity has not been released, surrendered to police for questioning and was later released.

A witness who posted video to Facebook said he saw at least three officers wounded near El Centro College. (Video is embedded below.) [[385949921,C]] It is the deadliest day for United States law enforcement agents since the Sept. 11, 2001, terrorist attacks killed 72, NBC News reported. The shooting comes just over a year after a man opened fire on Dallas Police Headquarters on South Lamar Street. No officers were injured in the ensuing shootout.