The man who killed himself during a shootout with a suburban Dallas police department once worked as a jailer and security guard and even praised the very officers he attacked, according to associates and records.

Patrick Gray Sharp, 29, died of a self-inflicted gunshot wound to the head, the Collin County Medical Examiner's office said Wednesday. The announcement came a day after Sharp towed a trailer loaded with explosives into the parking lot of the McKinney police station and set his pickup truck on fire, presumably to lure officers out of the building and shoot at them.

Sharp retreated to a field across a road and fired more than 100 rounds at police headquarters, McKinney police Chief Bob Kowalski said. The trailer didn't ignite.

Sharp killed himself during the shootout. Investigators found an assault rifle, a shotgun and a handgun on Sharp and later found more weapons in his home.

Nobody else was injured in the attack in the suburb of roughly 127,000 people about 30 miles north of Dallas.

Police said they don't have a motive.

"I guess the thing that's hardest for me is how did he even think of this?" said Cheryl Cox, the mother of Sharp's roommate. "What brought this out? Why would he do something in front of a police department?"

Sharp was a security guard for building wire manufacturer Encore Wire Corp. in McKinney, Cox said. A spokesman for Encore Wire told The Dallas Morning News that Sharp resigned a few days before the attack. Encore officials didn't return a call from 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 McKinney police, particularly since he often praised officers when he had to call them out to his work site.

"He relied on police to solve the problems at Encore," Cox said from her home just behind the house Sharp shared with Eric McClellan in Anna, about 15 miles north of McKinney. "He never said, 'Those jerks.' Nothing. He was always praising them."

Bobby Cox, the stepfather of Sharp's roommate, said Sharp worked for him at his nursery business and was reliable and respectful. Sharp went out of his way to help nursery customers, and once moved furniture for a woman who wanted to rearrange her living room before her husband returned from Germany, Cheryl Cox said.

Neighbor Randy Mullins said he once rebuked Sharp, who used a pellet gun to shoot a dog that was wandering through the neighborhood. But Mullins said they maintained a cordial relationship and that Sharp "seemed like a real cool guy."

Starting in 2001, Sharp was twice certified as a state-licensed security officer. The two-year licenses allowed him to work uniformed security but not carry a firearm.

The second license was obtained through a company in the Dallas suburb of Richardson where he worked from February 2004 through October 2005, according to a spokesman for the company, Silver Star Security. The spokesman declined to identify the companies for which Sharp would have provided security.

Sharp's security officer's license expired in 2006 and wasn't renewed, according to Department of Public Safety records.

DPS spokesman Tom Vinger said he could not comment on a specific person, but said state regulations allow security guards to work without a license as long as they aren't in uniform.

The spokesman for Silver Star Security said Sharp was a good officer who left the company to pursue other opportunities.

Sharp's work as a jailer was in 2001 under a temporary license for employees of contract facilities. According to the Texas Commission on Law Enforcement Officer Standards and Education, he worked three months at a federal prison operated by The GEO Group Inc. in San Antonio but didn't seek a permanent license when the temporary certification expired after a year.

A spokeswoman for the agency said there are no records to show why Sharp didn't complete the program required for permanent certification as a jailer.

A spokesman for The GEO Group said the company couldn't comment on specific employees.