US officials identified the gunman as Major Nidal Malik Hasan
Investigators in the US have charged Major Nidal Malik Hasan - suspected of shooting colleagues at the Fort Hood military base in Texas last week - with 13 counts of premeditated murder.
Why was he charged in a military court?
It comes as little surprise that Maj Hasan should be tried in a military court as the shootings he is accused of happened on an army base.
Nidal Malik Hasan is a serving major in the US army and all victims but one also served in the military.
The US military justice system is a branch of the law which regulates the military establishment.
Who will represent Maj Hasan?
His family have hired John P Galligan - a retired army colonel who now works as a civilian lawyer - to defend him.
The army will also provide Maj Hasan with a military counsel free of charge, which he can discharge if he so chooses.
What is the next step?
An article 32 hearing will be set. This refers to the article in the code of US military justice which requires a thorough and impartial investigation of the charges before they can be brought before a court martial.
In practice, this means a military officer will be appointed to investigate whether there is enough evidence to proceed with a court martial.
The appointed officer will make a recommendation to a so-called convening authority.
The convening authority will then decide whether to refer the case to a general court martial - the most serious level of courts martial.
Who would hear the case?
A military judge would be appointed to preside over the case. The jury would be made up of military personnel.
The jurors, called panel members in military courts, have to be of a higher rank than the accused.
In Maj Hasan's case, they could be lieutenant colonels, colonels and even generals.
Unlike in a civilian court, the jurors can pose questions during the proceedings.
Where will the case be heard?
Normally the court martial would be held at Fort Hood, where the alleged crime was committed.
However, his lawyer has already questioned whether Maj Hasan could receive a fair trial at the base.
Mr Galligan could file a motion to have the trial moved to another base, where - he would argue - the jurors are less likely to have been directly affected by the shooting.
What happens during the court martial?
The court martial would consist of two parts. The first is the "findings phase", where the prosecution would try to prove his guilt. They would call witnesses and present other evidence to bolster their case.
Maj Hasan's lawyers can cross-examine witnesses and challenge the evidence. They would then make their defence, calling their own witnesses.
The prosecutors then get their chance to rebut the evidence put forward by Maj Hasan's lawyers.
Once all the evidence was presented, the jury would meet privately and make its decision by secret ballot.
In most cases and unlike in civilian courts, only a two-thirds majority is needed for a conviction.
If found guilty, the sentencing phase could begin straight away.
A unanimous vote would be required to pass the death penalty.
Could Maj Hasan appeal against the verdict?
Once the verdict is passed, he could appeal to the US Army Court of Criminal Appeals.
If he loses his appeal, he could turn to the Court of Appeals for the Armed Forces, which is made up of five civilian judges appointed for 15-year terms by the president of the United States.
Should he fail his second appeal, he could turn - under certain circumstances - to the Supreme Court, the highest court of the land, for a final ruling.