A North Texas Army veteran has been identified as the lone gunman responsible for the sniper attacks that killed five police officers and injured seven others in Dallas, authorities say.

Micah Xavier Johnson, of Mesquite, ambushed officers at a peaceful protest against nationwide police-involved shootings in Dallas on Thursday, police said.

The investigation into Johnson's attack is still ongoing, and much remains is still unknown. But a picture is beginning to emerge of what went on inside the standoff — a source tells NBC Investigates that the 25-year-old was wounded by gunfire before being killed by a robot outfitted with a bomb — and how he prepared for the deadly assault.

LONE GUNMAN

Dallas Mayor Mike Rawlings confirmed Friday what multiple senior U.S. law enforcement officials had told NBC News Friday afternoon: Micah Xavier Johnson was the lone gunman in the rampage.

"This was a mobile shooter that had written manifestos on how to shoot and move, shoot and move, and he did that. He did his damage," Rawlings said.

Officials told NBC News the investigation so far has yielded no additional suspects that may have played a role in the shooting. Texas Gov. Greg Abbott said Friday that there is no information about additional co-conspirators, but if any are found, they will be brought to justice.

Sources tell NBC News they have found no ties between Johnson and any extremist groups so far.

"We believe now, that the city is safe," Rawlings said. "The suspect is dead, and we can move on to healing."

INSIDE THE STANDOFF

Johnson was laughing and singing and not at all anxious during the standoff at the El Centro College building, a law enforcement source with knowledge of the incident told NBC 5 Investigates senior reporter Scott Friedman.

Johnson told police he had specifically been training for this event and working out in preparation for Thursday night. NBC 5 Investigates has also learned Johnson was wearing a military-style bulletproof vest.

Johnson told police he spent time in the military and was carrying a military-style rifle.

Johnson was hit by gunfire before going into the El Centro college building and that officers followed Johnson's blood trail into the building, according to a law enforcement source.

Officers found him on the second floor, and then fired more rounds through a wall, apparently hitting Johnson again and wounding him.

After that, the negotiations began and spanned several hours. Johnson threatened many times to charge the officers, according to the source.

Johnson at first said that he only wanted to talk to black police officers – he said he didn't want to have anything to do with white people. He shared police conspiracies and his dislike for police officers, a law enforcement source said.

Officers cornered Johnson and negotiated with him for hours before talks broke down, police said.

Dallas Police Chief David Brown said Johnson told officers he was upset about recent shootings involving police and "wanted to kill white people, especially white officers."

After an exchange of gunfire, officers attached an explosive device to a bomb robot and detonated it near Johnson, killing him, Brown said.

A police source tells NBC 5 Investigates that the robot carried 3/4 of a pound of C-4, a plastic explosive. The robot reportedly suffered some damage but may not be a total loss.

The decision on how much to use was made by Dallas SWAT officers trained in explosives along with ATF experts on the scene.

A law enforcement source told Friedman on a scale of 1 to 10 this situation was a 30.

MILITARY HISTORY

The Army said Johnson served in the Army Reserve and did one tour of duty in Afghanistan, from November 2013 to July 2014.

Johnson was a private first class and his military occupational specialty was carpentry and masonry.

His service dates, as provided by the Army, were March 2009 to April 2015.

Dallas police said Johnson has no criminal history.

During a search of his home Friday, detectives found bomb making materials, ballistic vests, rifles, ammunition and a personal journal of combat tactics, police said.