A Royal Marine who fatally shot an injured Taliban fighter in Afghanistan could be freed from prison within weeks.

Sergeant Alexander Blackman, 42, from Taunton in Somerset, was sentenced to seven years on Tuesday for diminished responsibility manslaughter following the recent quashing of his murder conviction.

As a result of time already served since his original conviction in November 2013, the decision of five judges at the Court Martial Appeal Court means it is likely Blackman could be freed next month.

He has already spent almost three-and-a-half years in prison.

Announcing the seven-year term, the panel of judges, headed by Lord Chief Justice Lord Thomas, said: "As with any person sentenced to a determinate term, his release will ordinarily be at the halfway point of the sentence."

At a hearing last week the judges heard that Blackman's legal team had calculated he would have served the equivalent of a seven-year determinate sentence by April 24.

Blackman watched the proceedings via video-link from prison.

After the judges left court, there was uproar in the public gallery with a huge outburst of cheering and clapping.

Many veterans gave the thumbs-up to Blackman.

One of Blackman's legal team indicated he would probably be released in about two weeks, but the decision on the exact date was for the Prison Service to determine.

The Court Martial Appeal Court ruled previously that Blackman was suffering from an "abnormality of mental functioning" at the time of the 2011 killing in Helmand province when he was serving with Plymouth-based 42 Commando.

The court found the incident was not a "cold-blooded execution" as a court martial had earlier concluded, but the result of a mental illness, an "adjustment disorder".

The judges said Blackman had been "an exemplary soldier before his deployment to Afghanistan in March 2011", but had "suffered from quite exceptional stressors" during that deployment.

They found his ability to "form a rational judgment" was "substantially impaired".

Blackman was convicted of murder in November 2013 by a court martial in Bulford, Wiltshire, and sentenced to life with a minimum term of 10 years.

That term was later reduced to eight years on appeal because of the combat stress disorder he was suffering from at the time of the killing.

Blackman shot the insurgent, who had been seriously injured in an attack by an Apache helicopter, in the chest at close range with a 9mm pistol before quoting a phrase from Shakespeare as the man convulsed and died in front of him.

He told him: ''There you are. Shuffle off this mortal coil, you c***. It's nothing you wouldn't do to us.''

He then turned to comrades and said: ''Obviously this doesn't go anywhere, fellas. I just broke the Geneva Convention.''

The shooting was captured on a camera mounted on the helmet of another Royal Marine.

During his trial, Blackman, who denied murder and was known at that stage as Marine A, said he believed the victim was already dead and he was taking out his anger on a corpse.