An ex-soldier who pledged allegiance to Isis has been sentenced to life in prison for the execution-style killing of a Denver transit security guard.

Joshua Cummings has been sentenced to life in prison without parole after a three-day trial when a jury found him guilty of first degree murder concerning the brutal slaying of Scott Von Lanken, in Denver, Colorado.

The 38-year-old received the mandatory sentence after the court heard he walked up behind Von Lanken and shot him dead, whilst he was talking to two women on 31 January last year.

Police said Cummings put a gun to the victim's neck and shot him once after saying to the women "Do what you are told," or something similar, before he fired and ran away.

The defendant was found hiding on the terrace of an apartment building nearby holding a handgun, reported CBS News.

Von Lanken, a pastor and former police officer, was working as a security guard for the Denver area's Regional Transportation District when he was killed.

The 56-year-old preached at the Valley Assembly of God in Loveland, Colorado, the Denver Post reported, and had been a pastor in Ohio for two years previously.

The Associated Press (AP) reported Cummings, who joined the Army in 1996 but never saw combat, stated after his arrest that he supported the Islamic fundamentalist terrorists, although police found no link to the group.

Cummings, from Texas, also claimed to have fasted behind bars for three days to purge himself of an oath he took whilst a soldier to uphold the US Constitution.

It was reported that Denver's Muslim community had emailed the Department of Homeland Security on 24 December 2016, expressing concerns about comments the defendant made at mosque events.

The email stated Cummings was "very radicalised" and supported the implementation of Shariah law. It was also reported that Cummings had made controversial comments on Twitter about his views on Islam.