A Dallas ambush suspect was killed by a robot bomb, authorities have revealed. At least five officers were killed and six injured when a protest over the fatal shootings of Alton Sterling and Philando Castile turned violent.

LIVE UPDATES: Dallas protest turns violent, 5 officers dead

Chief David Brown told the press and Dallas Mayor Mike Rawlings confirmed that the police killed the suspect, who was holed up in a Dallas parking garage, using explosives to “blast him out.”

Earlier, local media reported the suspect had died from a “self-inflicted gunshot wound.”

BREAKING: Suspect holed up in Dallas parking garage reportedly dies from self-inflicted gun shot wound. — Fox News (@FoxNews) July 8, 2016

During a press conference, Chief Brown also shared the motives behind the suspect’s actions, which he quoted to the press.

“The suspect said he was upset about the Black Lives Matter. He said he was upset about the recent shootings. The suspect said he was upset at white people. The suspect said he wanted to kill white people, especially white officers,” Brown said.

He added that the suspect himself said he was not affiliated with any political or terror groups and had acted alone.

A fifth suspect may also be dead, CBS reported on Twitter, stressing this information has not been officially confirmed.

#Breaking Im getting unconfirmed reports from source that 2 suspects behind deaths of 5 officers are dead after standoff in parking garage — J.D. Miles (@jdmiles11) July 8, 2016

Three other suspects are all in custody.

The violence started on Thursday night during a peaceful protest in Dallas over the fatal shootings of Alton Sterling in Baton Rouge, LA, and Philando Castile in St. Paul, MN. At least four attackers, holed up in a downtown garage, used sniper rifles against police officers.

The incident then spread to the streets, where major corporations, restaurants and courthouses have premises. Police believe the attack was coordinated.

"[They were] working together with rifles, triangulating at elevated positions in different points in the downtown area where the march ended up going," Dallas Police Chief David Brown told a news conference.

READ MORE: Dallas suspect with rifle engaging in firefight with policeman (GRAPHIC VIDEO)

Brown also said the suspects had threatened to plant bombs in the downtown Dallas area.

Two officers injured in the shooting are in surgery while three remain in a critical condition, according to KTRK news. The condition of the sixth injured officer is unknown.

President Barack Obama called the shooting “a vicious, calculated, and despicable attack on law enforcement.”

“Police in Dallas were on duty doing their jobs keeping the people safe during a peaceful protest,” Obama said at a press conference ahead of the NATO summit in Warsaw.

He said that when people “are armed with powerful weapons” it makes attacks like the one in Dallas “more deadly, more tragic.”

“And in the days ahead we are going to have to consider those realities as well,” he added.

WATCH MORE: