The Collin County Medical Examiner's Office said Patrick Gray Sharp, 29, died of a self-inflicted gunshot wound to the head.
The shootout Tuesday morning came after Sharp towed a trailer loaded with explosives into the parking lot of the McKinney police station and set his pickup truck on fire, police said. Sharp retreated to a field across a road and fired more than 100 rounds at police headquarters, McKinney police Chief Bob Kowalski said.
Nobody else was injured in the attack in the suburb of roughly 127,000 people about 30 miles north of Dallas, and Kowalski says police don't have a motive. A McKinney police spokesman didn't immediately return a call Wednesday.
State records show Sharp was licensed by the Texas Department of Public Safety to work as a security guard in 2004. Three years earlier, he was licensed as a jailer by the Texas Commission on Law Enforcement Officer Standards and Education.
Sharp worked as a security guard for building wire manufacturer Encore Wire Corp. in McKinney, said Cheryl Cox, the mother of Sharp's roommate. A spokesman for Encore Wire told The Dallas Morning News that Sharp resigned a few days ago. An Encore official wasn't immediately available to comment to The Associated Press on Wednesday.
Cox said she thought of Sharp as a son and was "shocked" by the attack. She said she had no idea why he would target police.
Cox and her husband, Bobby Cox, live in a home just behind the house Sharp shared with Eric McClellan in Anna, about 15 miles north of McKinney. McClellan and Sharp were roommates for about four years.
Bobby Cox said Sharp showed no sign of trouble Saturday, the last time he and his wife saw him.
McClellan told the AP he was on vacation outside Texas when he received calls from state troopers and his stepfather telling him what happened. He said Sharp was "fine and dandy" when McClellan left Texas earlier this week.
"There's nothing I can say. He was a great guy, a good friend," McClellan said.
He said he and Sharp kept guns in their residence because they like sports shooting.
"We're Texans," he said. "We have the right to bear arms."
Sharp may have intended to lure people from the police station so that he could shoot at them from the field where he had taken cover, Kowalski said. He also may have intended to kill them by blowing up the trailer.
The fire set off ammunition in the truck but failed to ignite the trailer, which was filled with wood chips, ammonium nitrate, gasoline and road flares, Kowalski said.
Investigators later combed Sharp's property with bomb-sniffing dogs and found more weapons, Kowalski said.