A judge is expected to rule in the case of a Maryland woman who pleaded guilty to killing two of her children and injuring their two siblings during what she believed was an exorcism in 2014.

Zakieya Avery of Germantown, Maryland, pleaded guilty Monday to two counts of first-degree murder and two counts of attempted first-degree murder. The judge overseeing her case is expected to rule Thursday whether the 31-year-old can be held criminally responsible for her actions and should face prison or should instead be committed to a mental institution.

Avery's roommate, Monifa Sanford, who participated in the killings, previously took a plea deal in the case that committed her to a psychiatric hospital. Sanford said that the women stabbed the children because they believed they were possessed by demons.