Oklahoma Department of Corrections, File, Associated Press
FILE - This March 7, 2012 file photo provided by the Oklahoma Department of Corrections shows Garry Thomas Allen. A federal judge in Oklahoma City has stayed Allen's Thursday, April 12, 2012 execution.

OKLAHOMA CITY — Oklahoma prison officials prepared Thursday for the execution of a man who attorneys say is mentally impaired, even as they waited to hear whether an appeals court would overturn a stay issued a day earlier by a federal judge.

Garry Allen, 56, was scheduled to be put to death Thursday evening at the Oklahoma State Penitentiary, but U.S. District Judge David Russell granted the stay of execution Wednesday and gave Allen 15 days to file an appeal, saying he should have "adequate opportunity" to pursue claims he is incompetent for execution. Allen's lawyers also are challenging the constitutionality of Oklahoma's use of the prison warden for determining insanity.

The judge said Oklahoma's use of the warden in determining if a prisoner has become insane is "troubling," citing a Florida case in which the Supreme Court found the state's use of the governor and governor-appointed psychiatrists inadequate to determine mental capacity for execution.

Allen, who was shot in the head during his arrest, has been diagnosed with schizophrenia and dementia, but was found sane by a jury that considered whether he was fit for execution for killing the mother of his children in 1986.

Oklahoma prosecutors asked the U.S. 10th Circuit Court of Appeals in Denver to overturn the stay, saying Allen already has had ample time to make his arguments.

The appeals court had not ruled by Thursday evening, but staff were preparing to carry out the execution should the stay be lifted, Oklahoma Department of Corrections spokesman Jerry Massie said. Prison officials notified reporters they were preparing for an execution, which includes scheduling additional staff and placing the facility on lock-down.

Assistant Attorney General Robert Whittaker said in a filing that Allen's petition in federal court "is nothing more than a vehicle for further delay on top of the already lengthy delay he has been able to generate in the state courts."

Assistant Federal Public Defender Randy Bauman declined to comment Thursday.

Both sides can appeal to the Supreme Court after the ruling by the appellate court.

Allen pleaded guilty to capital murder for fatally shooting 24-year-old Gail Titsworth outside a day care where she had picked up her sons in November 1986. A police officer who responded found Allen in an alley and shot him in the head after he tried to shoot the officer. Tests showed Allen had a blood alcohol level more than three times the legal limit at the time.

Allen's attorneys say he had a history of mental illness before the shooting and that the gunshot injury caused more impairment. His family members have testified that before the killing he had frequent headaches, mood swings and spoke of hearing ghosts.

Oklahoma law calls for the prison warden to initiate court proceedings when there is "good reason" to believe an inmate has become insane, according to the judge's Wednesday filing. A previous plea to stay Allen's execution was denied earlier this week after Warden Randy Workman contradicted a neuropsychologist's finding that Allen was insane. Allen's lawyers argue it is unconstitutional for the warden to be the "gatekeeper" of determining his competency, according to the judge's ruling.

"In Oklahoma, the warden alone makes the initial determination of whether a capital prisoner is insane," the judge said in the ruling. "The statute does not require that he subject the prisoner to a mental health evaluation or that he even consider any evaluations or other documentation submitted by the prisoner's counsel. Under (the Florida decision), this procedure is troubling."

In 2005, the state Pardon and Parole Board had voted 4-1 to commute Allen's sentence to life in prison, but Gov. Mary Fallin rejected the recommendation and said his execution should proceed.

Associated Press writer Sean Murphy contributed to this report from McAlester, Okla.