Getting your Trinity Audio player ready...

Prosecutors said a woman returning to her west suburban apartment early last week found her 16-year-old daughter unconscious with a plastic bag over her head when the woman’s ex-boyfriend stepped out of a closet, wrapped her in a bear hug and stabbed her.

Juan Carlos Perez-Abarca, of Orland Park, was shot in the confrontation that followed with Cook County sheriff’s deputies, as the woman he had allegedly been stalking and harassing suffered a collapsed lung from the stab wounds.

The woman’s daughter, Emily Romo, died three days later, authorities said. An autopsy performed on Romo Tuesday determined the teen died of complications from asphyxia she suffered during the assault and the death was ruled a homicide, according to the Cook County medical examiner’s office.

Perez-Abarca, 35, appeared Friday before Cook County Judge William Fahy in Bridgeview on initial charges of attempted murder and home invasion, court records show. WLS-TV first reported on the attack in La Grange Highlands last week, which prosecutors said took place the same day Romo’s mother sought an order of protection against Perez-Abarca.

Prosecutors said Romo’s mother and Perez-Abarca had been dating for seven years before Romo’s mother ended the relationship a few months ago. Perez-Abarca had threatened to hurt himself in the months that followed, prosecutors said. On Aug. 9 he allegedly showed up where Romo’s mother was working to leave her a bouquet of flowers, then waited for her in the parking lot to ask if he could move in with her.

Later that day, prosecutors said Perez-Abarca followed Romo’s mother into a restaurant while she was on a date with another man. At the restaurant, he allegedly accused the woman of cheating on him, took video of her as she left the establishment and followed her and her date to a nearby bowling alley, authorities said.

The next day, Perez-Abarca allegedly went to the family’s building and asked their neighbors which unit belonged to Romo’s mother, claiming he was her brother-in-law.

Romo’s mother sought an emergency order of protection Aug. 11, prosecutors said. That order was denied and Perez-Abarca was instead notified to appear for a hearing, prosecutors said.

Returning home from the courthouse, prosecutors said Romo’s mother, a neighbor and the man she’d been to dinner with found a ladder propped against her apartment building. Perez-Abarca’s car was in the parking lot.

When deputies arrived, they allegedly found Romo on the floor and unconscious while Perez-Abarca held her mother at knifepoint. Prosecutors said a deputy shot Perez-Abarca when he lunged toward Romo’s mother, who had started to move away from him.

Romo’s mother suffered stab wounds and a collapsed lung, prosecutors said, while Romo was hospitalized on life support. Romo was pronounced dead Thursday, according to the medical examiner’s office.

Perez-Abarca was ordered held pending trial and is next set to appear in court Sept. 5.