NAPERVILLE, Ill. — A suburban Chicago woman stabbed her 7-year-old son 100 times, then turned the knife on a 5-year-old girl who witnessed the attack, killing both children as they begged for their lives, a prosecutor said Thursday.

Elzbieta Plackowska, 40, told investigators she stabbed the children and slashed their throats Tuesday night at a Naperville home because she was angry that her truck-driver husband was often away, said DuPage County State’s Attorney Robert Berlin.

“She told the detectives that she thought by killing (her son) Justin she would make her husband hurt the way she hurt in their relationship,” Berlin said.

Plackowska told investigators she found Justin and Olivia Dworakowski, whom she was babysitting that night, jumping on the bed, Berlin said.

“She had grabbed the knife, and she made both victims kneel and begin praying. She began stabbing her son Justin and told him he was going to heaven tonight. He pleaded for his life and told her to stop. But she continued stabbing him until he was dead,” he said at a news conference after the hearing.

“She then turned her attention to 5-year-old Olivia and began stabbing her with the knife multiple times. She, as well, pleaded for her life, but the defendant continued to stab her until she was deceased.”

Plackowska killed Olivia because she had witnessed the attack on Justin, Berlin said.

The slayings took place at the home of Olivia’s mother, who works nights as a nurse and had left her daughter in the woman’s care before. Plackowska also stabbed the two family dogs.

“In all my years in law enforcement, this is the most gruesome and horrific crime scene that I have seen,” said Naperville Police Chief Bob Marshall at the news conference. Naperville is 25 miles west of Chicago.

Investigators found two blood-stained knives: a steak knife in the kitchen sink and another in Plackow-ska’s car, Berlin said.

After the killings, Plackowska tried to go to a Naperville church but found it closed, so she left a message on its answering machine saying she had done something bad and needed assistance, Berlin said.

Still covered in blood and with scratches on her hands, she went to a friend’s home where her other, adult son was staying and told them that she had been robbed, Berlin said.

Around the same time, Olivia’s mother, Marta Dworakowski, returned home to discover her door locked and the babysitter’s car gone. She called police saying her daughter was missing, and officers forced their way into the home.

Police took Plackowska into custody at her friend’s home, and prosecutors charged her with first-degree murder late Wednesday.