(CNN)A federal judge granted Lisa Montgomery, the only woman on federal death row, a stay of execution pending a competency hearing -- just hours before she was scheduled to die.
Judge James Hanlon of the US District Court for the Southern District of Indiana wrote in the order granting the stay, "Ms. Montgomery's motion to stay execution is GRANTED to allow the Court to conduct a hearing to determine Ms. Montgomery's competence to be executed."
A date has not yet been set for the competency hearing.
Montgomery, 52, was scheduled to die by lethal injection on Tuesday, January 12 at the Federal Correctional Complex in Terre Haute, Indiana.
Prosecutors have filed a notice to appeal the judge's ruling.
Montgomery's attorneys, family and supporters have pleaded with President Donald Trump to read their clemency petition and make an executive decision to commute her sentence to life without the possibility of parole.
Montgomery was sentenced to death in 2008 by a Missouri jury for the 2004 murder of a pregnant woman, cutting the fetus out and kidnapping it. The baby survived.
"The Court was right to put a stop to Lisa Montgomery's execution," her attorney, Kelley Henry, said in a statement. "As the court found, Mrs. Montgomery 'made a strong showing' of her current incompetence to be executed. Mrs. Montgomery has brain damage and severe mental illness that was exacerbated by the lifetime of sexual torture she suffered at the hands of caretakers."
"The Eighth Amendment prohibits the execution of people like Mrs. Montgomery who, due to their severe mental illness or brain damage, do not understand the basis for their executions. Mrs. Montgomery is mentally deteriorating and we are seeking an opportunity to prove her incompetence," Henry added.
Montgomery also has a petition before the US Supreme Court.