A Pennsylvania man died Thursday morning after crashing his car into a home given to his ex-wife in the couple's just-finalized divorce agreement, marking a violent end to a deadly rampage spurred by the couple's split, officials said.

Before dying in the wreck, Bruce Rogal was involved in a shootout with cops, and it wasn't immediately clear if his death was a suicide or due to police gunfire. Rogal, 59, had earlier murdered his parents at the senior center where they lived and tried to kill his ex-wife, officials said.

“Bruce Rogal is dead," Chester County District Attorney Tom Hogan posted on Facebook. "There is no ongoing threat in Chester County. All law enforcement personnel involved are unhurt. It is a tragedy that the defendant killed his elderly parents. All of the first responders did a tremendous job under enormous pressure. Details will follow at a later time."

Rogal’s rampage began when he received his divorce papers, a development which seemed to have “set him off," Hogan told FOX29 Philadelphia. Rogal’s ex-wife was awarded the West Bradford Township house the couple used to live in.

Investigators said Rogal got in his car, drove past the house he had just lost in the divorce and opened fire when he spotted his ex-wife outside at around 5:45 p.m.

The woman, who was not identified, was not injured in the attack.

Rogal then drove to Bellingham Senior Living Center in East Goshen Township and fatally shot his parents, both of whom were in their late 80s, police said.

Police issued a lockdown for the area around the senior living center -- including for West Chester Area School District -- during the brief manhunt for Rogal, FOX29 reported.