SALT LAKE CITY (AP) — A former Utah teacher pleaded guilty Friday to murder charges in the shooting death of her ex-husband’s girlfriend, who was killed in front of the former couple’s 3-year-old twins.

Chelsea Watrous Cook slipped inside her ex-husband’s apartment and killed Lisa Vilate Williams while she and the children decorated a Christmas tree in 2018, prosecutors said.

Cook had drawn her ex outside his apartment with a message about dropping off cold medicine for the children, then ducked inside, authorities said. She refused to leave when he returned, and locked herself in the bathroom as he called 911.

Seconds later, she left the bathroom, grabbed a gun from her coat and fired the fatal shots, according to charging documents. Her ex-husband Travis Cook told the children to run into their rooms and lock the doors. He pinned his ex-wife to the wall and waited for police to arrive.

In an agreement with prosecutors, she pleaded guilty to aggravated murder, aggravated burglary, three firearm felonies and two misdemeanor counts of committing a violent offense in the presence of a child.

Cook initially showed little emotion as she entered her guilty pleas, though she began to cry as she acknowledged the charges involving violence in front of her children, the Salt Lake Tribune reported.

The Williams family has said Cook harassed the 26-year-old online and in person for months before the slaying, but Williams didn’t report the treatment to police because she worried about the effect it would have on the children.

Cook, who was a high school health teacher in Lehi, is expected to be sentenced on May 18.