FORT HOOD, Texas (AP) — An Army psychiatrist will not be allowed to plead guilty to any charges in the deadly 2009 Fort Hood shooting rampage, a judge ruled Wednesday.

Maj. Nidal Hasan's attorneys previously said he was ready to plead guilty to the 13 counts of premeditated murder he faces in the worst mass shooting on a U.S. military installation, but Army rules prohibit a judge from accepting a guilty plea to charges that carry the death penalty.

Defense attorneys then asked that Hasan be allowed to plead guilty to 13 counts of unpremeditated murder, which does not carry the death penalty.

No guilty pleas would have stopped his murder trial or possibility of being sentenced to death.

But the judge, Col. Tara Osborn, ruled Hasan cannot plead guilty to those lesser charges or the 32 counts of attempted premeditated murder that he also faces. He still would have been tried on the premeditated murder charges, so pleading guilty to the attempted premeditated murder charges could have been used against him at trial, Osborn said.

She also said he would not be allowed to plead guilty to unpremeditated murder and unpremeditated attempted murder, because that "would be the functional equivalent of pleading guilty to a capital offense." A capital offense is a charge that carries the death penalty.

Hasan's court-martial is to start with jury selection May 29 and with testimony July 1 on the Texas Army post.

Some military law experts have suggested Hasan wanted to plead guilty to lesser charges to try to avoid a possible execution, with defense attorneys hoping at least one juror would have seen Hasan's guilty pleas as a sign of remorse. Unlike other military trials, a jury's decision for a death sentence must be unanimous.

After hearing several hours of testimony Wednesday, Osborn also said she would consider whether to allow a terrorism consultant to testify at the trial. Prosecutors said Evan Kohlmann's testimony and report on Hasan would show motive. But defense attorneys said Hasan isn't charged with terrorism, so Kohlmann's testimony would be prejudicial to the military jury.