Maj. Nidal Malik Hasan sits in court for his court-martial in Fort Hood, Texas, in this file sketch.

FORT HOOD, Texas — A military judge blocked several key pieces of evidence Monday that prosecutors said would explain the mindset of the soldier accused in the 2009 shooting rampage at Fort Hood, including his belief that he had a “jihad duty” to carry out the attack.

Prosecutors had asked the judge to approve several witnesses and various evidence to support what they allege motivated Maj. Nidal Hasan to kill 13 people and wound more than 30 others at the Texas military base. But the judge, Col. Tara Osborn, blocked nearly all of it.

Osborn barred any reference to Hasan Akbar, a Muslim soldier sentenced to death for attacking fellow soldiers in Kuwait during the 2003 Iraq invasion. Prosecutors wanted to prove that Hasan, an American-born Muslim, wanted to carry out a “copycat” attack, but the judge said introducing such material would “only open the door to a mini-trial” of Akbar.

She also said such evidence would result in a “confusion of issues, unfair prejudice, waste of time and undue delay.”

The judge said prosecutors also couldn’t introduce three emails, ruling that the needed redactions would make them irrelevant. The contents of the emails were never disclosed, but the FBI has said Hasan sent numerous emails starting in December 2008 to Anwar al-Awlaki, a radical U.S.-born Islamic cleric killed by a drone strike in Yemen in 2011.

The judge also told prosecutors that they couldn’t cite Hasan’s interest years ago in conscientious objector status and his past academic presentations. Osborn said such evidence was too old and irrelevant.

However, the judge will allow evidence about Internet searches on Hasan’s computer around the time of the attack and websites that Hasan had listed as “favorites.” Osborn said that information was more timely.

Military prosecutors opened the trial by saying they would show that Hasan felt he had a “jihad duty,” referring to a Muslim term for a religious war or struggle. After calling almost 80 witnesses during the last two weeks, prosecutors said Friday that they would begin tackling the question this week.

Monday’s ruling frustrated Reed Rubinstein, an attorney representing victims and their relatives in a civil lawsuit against the U.S. government. He said only in an “alternative universe” could the emails excluded by Osborn be irrelevant, and he blamed the government for dragging out Hasan’s case and making the evidence now too old to be considered.

“The reason for that is the procedural pretzels the government has tied itself in to protect Hasan,” Rubinstein said, noting how the trial was originally delayed because of a fight over whether Hasan could keep his beard, which violates military policy.

Rubinstein said that even if Hasan were found guilty, a conviction that comes without prosecutors introducing Hasan’s alleged ties to terrorists in the criminal trial would leave a distaste for survivors of the attack.

Prosecutors indicated Friday that they had between 15 and 25 witnesses left, though it wasn’t immediately clear how Monday’s ruling would shorten the prosecutors’ case. Either way, Hasan was expected to get his chance to defend himself as early as Tuesday or Wednesday.

But the Army psychiatrist — who is acting as his own attorney — has put up little in the way of a defense so far.

Hasan signaled before trial that he had just two witnesses, but he has remained largely silent during the first two weeks of his trial. During a barely one-minute opening statement, he told jurors that evidence “will clearly show that I am the shooter,” but he said it wouldn’t tell the whole story.

Hasan faces numerous charges of murder and attempted premeditated murder. If convicted, he could face the death penalty.