A judge has granted a stay of execution to Lisa Montgomery, who was set Tuesday to be the first female inmate executed by the US federal government in 70 years.

Montgomery, 52, has been imprisoned for 16 years after she killed a pregnant woman in order to steal her fetus.

She was scheduled to receive a lethal injection Tuesday evening at a federal penitentiary in Terre-Haute, Indiana.

But Judge James Hanlon of the Southern District of Indiana granted her an eleventh-hour stay of execution Monday.

Montgomery's lawyers had argued she was too mentally incompetent to be executed, and said she had been born brain-damaged and endured a life of extreme abuse before committing her crime.

"The record before the Court contains ample evidence that Ms. Montgomery's current mental state is so divorced from reality that she cannot rationally understand the government's rationale for her execution," Judge Hanlon wrote in his ruling.

"'Both the (government) and the victims of crime have an important interest in the timely enforcement of a sentence,'" he said, citing precedent.

But "it is also in the public interest to ensure that the government does not execute a prisoner who due to her mental condition 'cannot appreciate the meaning of a community's judgment.'"

Hanlon said the court will set a time and date for a competency hearing for Montgomery.

In 2004, unable to have a child, Montgomery carefully identified her pregnant victim -- 23-year-old dog breeder Bobbie Jo Stinnett -- online.

Lisa Montgomery was convicted in 2007 and sentenced to death for killing a pregnant woman in order to steal her fetus
Lisa Montgomery was convicted in 2007 and sentenced to death for killing a pregnant woman in order to steal her fetus Wyandotte County Sheriff's Department / -

Under the guise of buying a puppy, Montgomery went to Stinnett's home, where she strangled her to death and cut the baby from her body. She left Stinnett dead in a pool of blood.

In 2007, she was convicted of kidnapping resulting in death and handed a death sentence.

She would have been the first woman executed by the federal justice system since 1953.

Without denying the seriousness of her crime, Montgomery's lawyers last week sought clemency from US President Donald Trump.

But Trump, an outspoken supporter of the death penalty, has so far failed to act on their request.

Despite the decline of capital punishment in the US and around the world, Trump's administration resumed federal executions in July after a 17-year hiatus and has been carrying them out at an unprecedented rate ever since.

Since the summer, 10 Americans have died by lethal injection at Terre-Haute. In addition to Montgomery, two men are scheduled for federal execution this week.

Montgomery may escape the death penalty entirely, as President-elect Joe Biden -- due to be sworn into office on January 20 -- opposes capital punishment.

The Democrat has promised to work with Congress to try and abolish the death penalty altogether.

Montgomery's execution has been postponed once before: after her lawyers tested positive for Covid-19 in November, a court postponed her execution until at least December 31.