RICHMOND, Va. — An ex-girlfriend of the gunman at a Virginia bus station said Friday he frequently expressed his hatred toward police and once nearly choked her to death after she broke up with him.

James Brown III was killed Thursday by two Virginia state troopers after authorities say he fatally shot Trooper Chad P. Dermyer at a Richmond Greyhound station.

Brown, 34, who had a lengthy criminal record, previously said he would rather die fighting police than return to prison, the ex-girlfriend said.

"He wanted to be one of those guys that just died killing police officers because they are not taking him back to jail," she said.

She spoke to The Associated Press on the condition of anonymity because she said she fears for her safety.

Authorities said Friday they're still trying to piece together what exactly happened at the busy bus terminal and what Brown's motive was.

Dermyer had been participating in a counterterrorism training exercise at the bus station with about a dozen other troopers, special agents and supervisors when he was shot. Two women were also shot but were expected to recover.

State Police Superintendent Col. Steven Flaherty said surveillance footage from the bus station helped authorities pull together what happened moments before the shooting. Brown, at the terminal for a stop on his way to Chicago, was seated in a restaurant. He walked toward his bags near the front entrance of the station and encountered Dermyer, who may have made some small talk, and Brown pulled a handgun and started firing.

Flaherty said the gun was legally purchased more than a year ago, but not by Brown. He had more than 140 rounds with him.

Brown had an extensive criminal record in his home state, including charges of attempted murder, unlawful possession of a firearm and body armor as a felon and threatening to kill someone by phone. He often pleaded guilty to lesser charges or a single charge after being charged with several crimes.

Brown's most recent conviction there was from 2012, when he pleaded guilty to domestic battery and aggravated battery of a pregnant woman and was sentenced to 2 1/2 years in prison.

The injured women's names haven't been released, but a spokesman for Binghamton University in New York said that one of them was a member of the school's track team. The team was headed Thursday to a meet at the College of William and Mary in Williamsburg, about 50 miles from Richmond.

The Binghamton student was released from the hospital Friday, spokesman Ryan Yarosh said.

The police identified the student as a 21-year-old woman from Wingdale, New York. The other woman hurt was a 47-year-old from Jacksonville, North Carolina, who was also passing through. Her injuries were not life-threatening.

The slain trooper is survived by his wife and two children. He was a former Marine who previously served on police forces in Jackson, Michigan, and Newport News, Virginia.

Friends and family fondly recalled Dermyer as a devoted family man and consummate professional.

"He was a gentle, outgoing person who would do anything for anyone," his brother John Dermyer Jr. said in an email.

Earlier this year, Dermyer and another trooper became mini celebrities when they helped rescue a lost dog running through interstate traffic in Hampton.

He also made one of the department's most high-profile recent arrests after he pulled over woman over last year on Interstate 64 for expired license plates.

Dermyer called a former partner and said the driver was acting normal but he couldn't shake a strange feeling. Dermyer eventually searched the trunk and found the remains of the driver's long-missing son, authorities said. The driver has since been charged with murder.

It was the kind of career-making stop that friends and colleagues said highlighted his natural gift for police work.

"That was him: He dug; he didn't give up," said Cyndi Grace, who partnered with Dermyer for four years at the Newport News Police Department. "He was exceptional in every sense of the word."

___

Associated Press writers Larry O'Dell and Steve Szkotak in Richmond, Kasey Jones in Baltimore, and David Mercer from Champaign, Illinois contributed to this report.