FORT HOOD, Texas (AP) — A military judge will not allow an Army psychiatrist to tell jurors that he shot Fort Hood soldiers to protect Taliban leaders in Afghanistan.

The judge said Friday that Maj. Nidal Hasan’s “defense of others” strategy fails as a matter of law.

Judge: Accused Fort Hood Shooter Cant Argue He Killed Soldiers to Protect the Taliban

In this courtroom sketch, U.S. Army Maj. Nidal Hasan, right, sits by his former defense attorneys Maj. Joseph Marcee, far left, and Lt. Col. Kris Poppe, center, during a hearing at Fort Hood, Texas, Tuesday, June 11, 2013. (AP)

Col. Tara Osborn said no soldiers at the Texas Army post on Nov. 5, 2009, posed an immediate threat to anyone in Afghanistan. She said the legitimacy of the Afghanistan war is not an issue at Hasan’s trial, which hasn’t started.

Hasan is an American-born Muslim. He faces the death penalty or life without parole if convicted in the rampage that left 13 dead and nearly three dozen wounded.