Updated

A Utah woman accused of fatally shooting her ex-husband’s new girlfriend in front of the former couple's children was able to gain access to the woman's location by tricking her ex-husband into leaving the apartment -- allowing the jilted lover to sneak inside for the slaying, prosecutors said.

Chelsea Watrous Cook, 32, was charged with aggravated murder, burglary and violence in the presence of a child in the murder of Lisa Vilate Williams. Williams was killed in a Salt Lake City apartment on Nov. 25.

Cook, a high school health teacher, reportedly drew her ex-husband Travis Cook outside his apartment by messaging him that she'd be dropping off cold medicine for the former couple's 3-year-old twins. When Travis Cook walked to the parking lot, Chelsea snuck into the home and refused to leave.

When her ex-husband returned inside, she locked herself in the bathroom while he called 911.

Then, less than a minute later, she suddenly walked out, grabbed a gun from her coat and fired the fatal shots.

When she was killed, Williams was standing by a Christmas tree she was decorating with Travis and Chelsea's 3-year-old girls standing next to her.

5f376dbc-

Lisa Vilate Williams was killed by her boyfriend's ex-wife while decorating a Christmas tree with his 3-year-old twins. (Tawny Williams via AP)

Cook’s ex-husband told the children to run to their rooms and lock the doors. In the meantime, he pinned his ex-wife to the wall and waited for police to arrive.

Williams died later that night at a hospital.

Williams’ family told the Associated Press that Cook had harassed the 26-year-old woman online, on the phone and in person for months before the shooting.

They said the harassment started in June and included confrontations at the bank where Williams worked as a teller, bullying on Instagram and phone calls made from the high school where Cook worked.

“I worried for her safety every day,” said Williams' mother, Tawny Williams.

Court records show Travis and Chelsea had their divorce finalized in January. Travis Cook and Lisa Williams had been dating for six months before her murder.

“I spoke to her an hour or so before it all happened, and she was so excited … to give those kids something happy,” the victim’s sister, Bekah Williams, told the Associated Press.

She said her sister had been reluctant to report Cook’s behavior to the police, worried that involving authorities could make the situation harder on the children.

Bekah Williams added: “In hindsight, I think the best thing for the kids would have been to call the police every time."

The Associated Press contributed to this report.