The gunman who opened fire on Dallas police officers has been identified as Micah Xavier Johnson.

Johnson, 25, has no previous criminal history or ties to terror groups, according to the Los Angeles Times. He served in the U.S. Army Reserve, according to CNN.

Twelve officers were shot and five were killed in the melee, which started around 8:45 p.m. Thursday in downtown Dallas.

Read more about Dallas shootings

Johnson was upset with white people and the recent spate of police shootings, according to the Times.

"He wanted to kill officers. And he expressed killing white people, killing white officers, he expressed anger for Black Lives Matter," Dallas Police Chief David Brown said at a news conference.

Johnson was killed after several hours of negotiations with police soured then turned into an exchange of gunfire. Police used a bomb robot to end the standoff.

>> Read more trending stories

"We saw no other option than to use our bomb robot and place a device on its extension to detonate where the suspect was," Brown said. "Other options would have exposed our officers to grave danger."

Johnson, of Mesquite, was killed in a parking garage near El Centro College, according to CBS News.

Johnson told police that he acted alone, according to CBS News.

During a search of the suspect's home, Dallas detectives said they found bomb-making materials, ballistic vests, rifles, ammunition, and a personal journal of combat tactics. 

Johnson was a private first class with a specialty in carpentry and masonry. He served in the Army Reserve for six years starting in 2009 and did one tour in Afghanistan from November 2013 to July 2014, the military said.

He received further instruction at the Academy of Combative Warrior Arts in the Dallas suburb of Richardson about two years ago. 

When asked about Johnson, a man who answered the door Saturday at the school said, "He trained two years ago. ... I don't know anything about Micah. I'm sorry. He's gone. He's old to us. I have thousands of people."

Police also said that Brandon Waller, 25, was arrested Thursday for unrelated weapons charges at the scene of the shootings.