Alexander Blackman, the Royal Marine who killed an injured Taliban fighter in Afghanistan, has had his murder conviction reduced to "manslaughter by reason of diminished responsibility" at the Court Martial Appeal Court.
Five judges ruled that Mr Blackman was suffering from an "abnormality of mental functioning" at the time of the killing in 2011.
They found the incident was not a "cold-blooded execution" as a court martial had earlier concluded, but the result of a mental illness.
Former Sgt Blackman, also known as 'Marine A', was not present for the ruling.
He has already served three years of a life sentence, and a hearing will now take place to decide what further time he will serve.
Claire Blackman, the wife of Royal Marine Blackman, said she was "delighted" by the decision to reduce her husband's murder conviction saying it "much better reflects the circumstances that my husband found himself in during that terrible tour of Afghanistan".
Former RAF pilot and novelist, Frederick Forsyth, who has led a campaign to see Sgt Blackman released, told the crowd outside the court that "it's not over yet", and that he "always wanted justice".
"There are things that need to be said about what was done to that man and who did it to him," he said.
In a statement, a Ministry of Defence spokesman said they "respect the court's decision". It added: "We have fully co-operated with each stage of Sergeant Blackman’s case, which has now involved a criminal investigation, a court martial and the appeal process, and will continue to provide personal support to the family, as we have done since charges were first brought."
Speaking during Prime Minister's Questions, Mrs May said that the MoD will continue to provide support to Sgt Blackman's family and has praised the work the Royal Marines do:
"Our Royal Marines have a worldwide reputation as one of the world's elite fighting forces. They make an incredible contribution to our country and we should pay tribute to them all for that."
In 2011, 'Marine A' was serving with Plymouth-based 42 Commando in Helmand province, Afghanistan.
Blackman shot an 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 his 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.
He was ''dismissed with disgrace'' from the Royal Marines after serving with distinction for 15 years, including tours of Iraq, Afghanistan and Northern Ireland.
In November 2013, Mr Blackman became the first British serviceman to be convicted of murder on a foreign battlefield since the Second World War, and was sentenced to life with a minimum term of 10 years.
In May 2014, the Court Martial Appeal Court rejected a conviction challenge but reduced the minimum term to eight years because of the combat stress disorder he was suffering from.
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.