A Naperville woman was in a psychotic state and said she heard a shadowy voice urging her to kill her young son and another child before she stabbed them to death, a noted forensic psychiatrist testified Wednesday at the woman's murder trial.

Elzbieta Plackowska was out of touch with reality on Oct. 30, 2012, when she killed her son, Justin 7, and Olivia Dworakowski, 5, believing them possessed by the devil, said Dr. Phillip Resnick, the main defense expert witness who spent more than four hours on the witness stand in DuPage County court.

Plackowska, he said, could not substantially appreciate the criminality of her actions at the time of the stabbings.

"Ms. Plackowska had a psychotic belief that devils had entered Olivia and Justin and that by taking their lives, she was allowing the children to enter heaven," Resnick said.

Plackowska's attorneys are mounting an insanity defense, but DuPage County prosecutors contend that she was aware of her actions when she stabbed the children more than 100 times, and then killed two dogs, at the Dworakowski condo in Naperville, where Plackowska was babysitting Olivia.

Resnick, a professor of psychiatry at Case Western University in Cleveland who has consulted in the cases of Jeffrey Dahmer, Oklahoma City terrorist Timothy McVeigh and Unabomber Ted Kaczynski, said he examined Plackowska about 10 days after the crime and also reviewed the evidence in the case.

On videotaped interviews with police in the hours after the stabbings, Plackowska agreed with detectives that she was unhappy in her life and marriage, and that was her motivation. But Resnick said Plackowska was "browbeaten" into that confession by police.

Resnick said Plackowska told him that while she was with the children in the bedroom of the condo, she saw a "black shadow" and believed the devil was entering the children, he testified.

The shadow spoke to her, she told Resnick, urging her to "kill them, kill them."

"You are going to be the last one," she said the shadow told her. "You are going to die, but you will be the last one."

She told Resnick that "something took over me" and she stabbed the children, he testified.

Resnick said that her father's death in her native Poland several weeks before the stabbing was the major event that sent Plackowska on a descent into psychosis. The fact that several people noted Plackowska acting unusually in the days before the homicides and mentioning devils gives her story credence, Resnick said.

He also said that it was "unheard of" for someone to fake manic and psychotic symptoms for the number of days Plackowska exhibited them after the slayings.

Resnick will continue testifying Thursday and will face cross-examination from prosecutors. They have pointed to inconsistent accounts offered by Plackowska, as well as other evidence they say shows Plackowska attempting to avoid responsibility for her actions after the deaths.