Micah Xavier Johnson, the 25-year-old identified by US media as the main shooter in the assault that left five police officers dead, served with US forces in Afghanistan from November 2013 to July 2014, an Army statement said.
The Texas resident served as an active reservist for six years from 2009 to 2015, holding the rank of Private First Class and specializing in carpentry and masonry.
Johnson lived in the Dallas suburb of Mesquite, according to US media. He was killed in a tense showdown with police after the shootings Thursday night.
Seven police officers and two civilians were also wounded in the chaotic fray in Dallas, one of many places across the United States where protests erupted over the fatal police shootings of two black men earlier this week.
Dallas police said the suspect told negotiators he was upset about the recent fatal police shootings of black men, and wanted to kill white people — specifically, white cops.
CNN, citing an unnamed law enforcement official, said Johnson had no criminal record or known ties to extremists.
The network broadcast what it said was a photograph of the suspect, a black man with a short beard shown with his fist raised and wearing an African-style print tunic.