Nidal Hasan, who killed 13 unarmed US military personnel at the Fort Hood army base in Texas in 2009, was executed by a US military firing squad on Saturday. He was pronounced dead at 13:17 local time (19:17 GMT), according to an Army news release.

Hasan, a former army psychiatrist, also injured 32 people in the attack. He is the first person executed by the US military since 1961, and the first by firing squad in the military since 1945.

The execution followed a years-long legal battle. Hasan’s lawyers made a final appeal to the Supreme Court on Saturday, minutes before the execution, but the court rejected his request for a stay. On Wednesday, an appeals court called his argument that he was allegedly defending Taliban fighters in Afghanistan “patently frivolous”. It also said public remarks by President Donald Trump and Defense Secretary Pete Hegseth did not show either had improperly influenced the execution arrangements.

The Trump administration said earlier this year it would livestream the execution, but Trump cancelled the plan after widespread criticism. He approved the execution in October and previously described Hasan as “one of the most evil killers in modern times”.

The Army said the firing squad comprised 14 soldiers: four live firing squad members, nine blank firing squad members and one officer in charge. One member was a woman. All had volunteered and were members of the US Army Corrections Brigade.

Under military policy, Hasan was placed “into a seated execution chair”. He had been paralysed from the chest down after being shot during the attack. Charges were read to him one final time before a hood was placed over his head.

The execution was witnessed by 55 victims and family members, as well as military personnel and two journalists, according to the Army statement. Only two media members were allowed to attend: reporters from Reuters and Fox News, selected by Hegseth.

The reporters said afterwards that the execution took place outdoors near a warehouse. They were kept at a distance and could not clearly see Hasan. One said he wore a burgundy outfit. Both said Hasan was strapped down, made no sounds and did not speak during the brief process. They could not see the other witnesses and did not see any cameras.

Hasan admitted to the mass shooting but repeatedly challenged his death sentence. In 2013, he was convicted on 45 counts of murder and attempted murder. After exhausting appeals in military courts, he appealed in federal court in November, arguing that US troops were legitimate targets and that members of the Trump administration had engaged in “unlawful command influence” over his case.

A heavy security presence was seen at the sprawling Texas base ahead of the execution, including drones flying overhead. Few details had been released, including the location on the base where it would take place.

Death by firing squad, once a common form of execution, particularly in the military, is rare in the US. It is legal in five states: Idaho, Mississippi, Oklahoma, South Carolina and Utah.