The BBC's Nick Bryant reports from the court, which "looks more like a bunker"
Profile: Major Nidal Malik Hasan
Fort Hood suspect's defence rejected
Mardell: US fear of enemy within
A former US Army psychiatrist who killed 13 soldiers at an Army base in Texas in 2009 has admitted in court he was the gunman and apologised for "any mistakes", as his court martial opened.
But Maj Nidal Hasan, 42, told the jury at Fort Hood, Texas, that the evidence told only one side of the story.
Maj Hasan has said he was protecting Muslims and the Taliban in Afghanistan.
If convicted on 13 counts of murder and 32 counts of attempted murder, the US-born Muslim could face execution.
"The evidence will clearly show that I am the shooter," Maj Hasan told the jury of 13, including nine colonels, three lieutenant colonels and one major.
He added: "We are imperfect Muslims trying to establish the perfect religion."
The killings are the deadliest ever non-combat attack on an American military base.
During the prosecution's opening statements, Col Steve Henricks said Maj Hasan deliberately targeted "unarmed, unsuspecting and defenceless soldiers" when he opened fire, and planned to "kill as many soldiers as he could".
He said Maj Hasan had carefully prepared for the attack, visiting a target practice range, buying a gun, and stuffing paper towels into his trouser pockets to muffle noise from the weapons before he opened fire.
"All those fully loaded magazines do not clink, do not move, do not give him away," Col Henricks told the jury. "He sits among the soldiers he's about to kill with his head down."
Judge Col Tara Osborn has already barred Maj Hasan from arguing the attack was undertaken in "defence of others", ruling there was no evidence the soldiers at the base posed any threat to the Taliban leadership - and declaring the justice of the US-led war in Afghanistan would not be up for debate in the court.
Col Osborn has also said Maj Hasan will not be allowed to make speeches about his beliefs or try to testify himself while questioning witnesses.
Witnesses say that on 5 November 2009, Maj Hasan entered a crowded Fort Hood medical building where deploying soldiers were awaiting check-ups and vaccines.
He climbed onto a desk, shouted an Islamic benediction, and opened fire with two handguns, pausing only to reload, witnesses said.
His trial will take place at the same military base near Killeen, Texas, where he carried out the attacks.
Maj Hasan was about to be deployed to Afghanistan.
The prosecution is expected to present evidence of the US-born soldier's radicalisation, including internet searches for "Jihad" and "Taliban" hours before the shootings.
Retired US Army Staff Sgt Shawn Manning is among the wounded who will testify at the trial
The Pentagon has treated the case as an act of workplace violence, rather than an act of terrorism, a legal distinction that has angered victims and family members, says the BBC's Nick Bryant at Fort Hood.
Many of those wounded in the attack are expected to testify and may be cross-examined by Maj Hasan, who is acting as his own attorney.
He uses a wheelchair after being paralysed when he was shot in the back by a base police sergeant who responded to the shootings.
The trial has been delayed by a series of requests for preparation or other issues, including an objection by prosecutors to Maj Hasan's beard, which contravenes military regulations but he was ultimately allowed to keep.
Analysts say the military prosecutors are being extra cautious in order to avoid anything that could lead to a reversal of a guilty verdict.
If found guilty and sentenced to death, Maj Hasan would have multiple automatic appeals available to him. And even if those are ultimately unsuccessful it could be decades before any eventual execution.