The suspected gunman, identified as Micah Xavier Johnson, told police before he was killed that he was upset about the recent police shootings of black men Alton Sterling and Philando Castile and wanted to kill white people, especially officers, according to Dallas Police Chief David Brown.

"We're hurting. Our profession is hurting. Dallas officers are hurting. We are heartbroken," Brown said. "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."

On Friday afternoon, multiple senior U.S. law enforcement officials said the investigation so far has led them to believe that Johnson was the lone gunman in the attack. The law enforcement officials told NBC News that they believe Johnson acted alone and investigators have not found ties between Johnson and any extremist groups so far.

Dallas Rally Organizer on Attack: It Was 'Mayhem'

One of the organizers of the Dallas rally told NBC 5 a the protest was peaceful and as the crowd begun to disperse, they heard gunfire. "They were shots ringing out from what felt like every direction," Cory Hughes said. He said the scene turned into "mayhem; we didn't know where to go." He said he knew it was a serious situation when he saw officers coming from all directions, carrying rifles and tactical gear.

Black Lives Matter leaders, the NAACP and other activists — including organizers of the Dallas protest — condemned Thursday's ambush, which killed five officers and wounded seven others as protesters flooded the streets of Dallas. Two civilians were also injured, authorities said.

"Never in our wildest dreams would we have imagined that five police officers would be dead this morning," said Rev. Dr. Jeff Hood, who helped organize the protest.

Rev. Jesse Jackson, a prominent civil rights leader from Chicago who has called for protests against police brutality, also decried the ambush Friday.

"We want to express our fervent prayers and deepest condolences to the families of the slain Dallas police officers," Jackson said during a press conference. "Attacking the officers was a cowardly and insane act of terrorism and in no way represents anything about our long struggle for peace and justice for all."

Jackson, who said he met recently with the families of Sterling and Castile, called for an "aggressive and sweeping campaign" by the federal government to end police violence and urged supporters to stay focused.

First Seconds: Protest Erupts into Gunfire

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.

(Published Friday, July 8, 2016)

"Keep marching," he said. "Don't give up the moral high ground of nonviolent marching."

Organizers of the Black Lives Matter movement took to Twitter to decry Thursday's attack.

Sterling was shot and killed by an officer early Tuesday in Baton Rouge, Louisiana. The mother of one of his children denounced the Dallas attack in a statement released by her attorneys, saying, "responding to violence with violence is not the answer."

"We wholeheartedly reject the reprehensible acts of violence that were perpetrated against members of the Dallas Police Department," Quinyetta McMillon said in the statement. "Our hearts break for the families of the officers who were lost as they protected protesters and residents alike during a rally."

Obama: America Is 'Horrified' Over Dallas Attack

"I believe I speak for every single American when I say that we are horrified over these events," President Barack Obama said after five police officers were fatally shot in Dallas at a protest Thursday.

(Published Friday, July 8, 2016)

Castile was killed Wednesday during a traffic stop in a suburb of St. Paul, Minnesota, just a day after Sterling's death. Their shootings sparked protests nationwide, with Black Lives Matter supporters calling for justice.

"We have to put an end to this epidemic of 21st century lynching at the hands of those wearing blue uniforms," the NAACP tweeted Thursday.

The organization quoted Brooks, its president, as saying, "African-Americans are regarded as the objects of suspicion — not the subjects of protection — by the police."

It's the latest chapter in a nationwide discussion about the killing of black men and women by police, incited by the deaths of Travyon Martin in Florida, Michael Brown in Ferguson, Sandra Bland in Texas, Freddie Gray in Baltimore and Eric Garner in New York, among others.

"They're not getting any kind of the benefit of the doubt. There's no conversation. If there is a conversation, it's a one-way conversation where the African-American male is being yelled at, pretty much, 'Sit down and be quiet or you're going to get shot,'" said Philip Smith, president and founder of National African American Gun Association.

Speaking from Washington on Friday, members of the Congressional Black Caucus mourned the shootings in an emotional press conference.

"When we were arrested, jailed and beaten, we didn't fight back. And today, we feel the pain, we feel the hurt of the people in Baton Rouge and Minnesota and Dallas and all across our country," said Rep. John Lewis, a Democrat from Georgia.

"Whatever we do, we must do it in an orderly, peaceful, nonviolent fashion to have redeemed the soul of America and bring us together ... We must learn to live together as brothers and sisters. If not, we will perish as fools," Lewis added.

Protesters gathered around the country Thursday night and more demonstrations were planned for Friday.