Media playback is unsupported on your device Media caption What does the joint enterprise ruling mean?

The law which has allowed people to be convicted of murder even if they did not inflict the fatal blow has been wrongly interpreted for more than 30 years, the Supreme Court has ruled.

The joint enterprise law has been used to convict people in gang-related cases if defendants "could" have foreseen violent acts by their associates.

However, judges ruled it was wrong to treat "foresight" as a sufficient test.

Their decision could pave the way for hundreds of prisoners to seek appeals.

It will apply in England, Wales, Northern Ireland and most UK overseas common law territories but not in Scotland, which has its own rules on joint enterprise.

Campaigners against joint enterprise welcomed the ruling, saying it would mean a fairer law - but some murder victims' relatives said they were worried about possible appeals.

What is the controversial 'joint enterprise' law?

A moment of genuine legal history

Murder ruling 'brings heartache'

Image copyright Leicestershire Police Image caption Ameen Jogee (L) and Mohammed Hirsi were both given life sentences under a joint enterprise conviction

The ruling came after a panel of five Supreme Court judges considered the case of Ameen Jogee, who had been convicted under joint enterprise of the murder of former Leicestershire police officer Paul Fyfe in 2011.

The court heard that Jogee had "egged on" his friend Mohammed Hirsi, who stabbed Mr Fyfe in the heart. Both men received life sentences for murder.

Jogee had argued he was not inside the house when the incident took place, and could not have foreseen what his friend intended to do.

Joint enterprise convictions

Image caption Gary Dobson and David Norris were convicted under joint enterprise of the 1993 murder of Stephen Lawrence

Joint enterprise law has been used to convict and hand down long sentences in several high-profile cases:

Stephen Lawrence: David Norris and Gary Dobson were convicted under joint enterprise in 2012 for the 1993 murder of Stephen Lawrence. He was stabbed to death by a gang in a racially motivated murder in Eltham, south-east London, when he was 18

David Norris and Gary Dobson were convicted under joint enterprise in 2012 for the 1993 murder of Stephen Lawrence. He was stabbed to death by a gang in a racially motivated murder in Eltham, south-east London, when he was 18 Garry Newlove: Three teenagers - Adam Swellings, Stephen Sorton and Jordan Cunliffe - were jailed for life for the 2007 murder of Garry Newlove. He was attacked after he confronted a group outside his house in Warrington, Cheshire

Three teenagers - Adam Swellings, Stephen Sorton and Jordan Cunliffe - were jailed for life for the 2007 murder of Garry Newlove. He was attacked after he confronted a group outside his house in Warrington, Cheshire Shakilus Townsend: Samantha Joseph was jailed for 10 years for the 2008 killing of Shakilus Townsend, 16, after acting as a "honey trap" to lure him to his death. Joseph led Shakilus to a quiet cul-de-sac in Thornton Heath, south London, where he was beaten with baseball bats and stabbed six times by her older boyfriend Danny McLean. They were both convicted of murder

Samantha Joseph was jailed for 10 years for the 2008 killing of Shakilus Townsend, 16, after acting as a "honey trap" to lure him to his death. Joseph led Shakilus to a quiet cul-de-sac in Thornton Heath, south London, where he was beaten with baseball bats and stabbed six times by her older boyfriend Danny McLean. They were both convicted of murder Zac Olumegbon: Five teenagers were given jail sentences totalling 76 years in 2011 over the killing of 15-year-old Zac Olumegbon. He was stabbed as he arrived at Park Campus School in West Norwood, south London, in 2010.

Delivering the judgement, Lord Neuberger said it was wrong to treat "foresight" as a sufficient test to convict someone of murder.

"The court is satisfied after a much fuller review of the law than in the earlier cases that the courts took a wrong turn in 1984. And it is the responsibility of this court to put the law right," he said.

The judgement refers to a ruling by the Judicial Committee of the Privy Council in a case in which three gang members armed with knives burst into the home of a prostitute and her husband in Hong Kong, intending to collect a debt.

The husband was stabbed to death at the hand of at least one of the gang members. All three were convicted of murder.

Media playback is unsupported on your device Media caption The decision could pave the way for hundreds of prisoners to seek appeals

BBC legal affairs correspondent Clive Coleman said Thursday's ruling did not mean those convicted under joint enterprise would automatically be able to appeal.

The change to the law is not retrospective - so anyone appealing would have to show that they would suffer "substantial injustice" if they were not allowed to appeal, our correspondent said.

In Jogee's case, the Supreme Court "set aside" his conviction - meaning the verdict in his original trial no longer stands.

However, the ruling does not mean Jogee will walk free, as the court found he was unquestionably guilty of at least manslaughter, and there was evidence that he could have been guilty of murder, our correspondent said.

Image caption Ameen Jogee's mother Rachel Whitehead argued joint enterprise was a "lazy law" that had convicted innocent people

Jogee's mother Rachel Whitehead said she was "absolutely delighted" her son was no longer convicted of murder, and hoped he would soon be free.

She called joint enterprise "a lazy law", saying: "It should never have been invented. It's just been used to convict innocent people of crimes they didn't commit."

'Pack of animals'

Simon Natas, a lawyer who has worked with campaign group Joint Enterprise Not Guilty By Association, said the "historic" ruling would make the law "fairer for everybody".

Lorraine Fraser, whose son Tyrone Clarke was killed by a gang in 2004, said she thought the law should stay in place. Four men were found guilty of Tyrone's murder by joint enterprise.

"They were a pack of animals around him and they all pleaded not guilty in court," she said, adding they should not be allowed to appeal.

In further remarks after publishing the judgement, Lord Neuberger said:

The ruling did not automatically mean that all previous joint enterprise convictions were unsafe

"A person who joins in a crime, which any reasonable person would realise involves a risk of harm, and death then results, is guilty at least of manslaughter", the maximum sentence for which is life imprisonment

The rule that "a person who intentionally encourages or assists the commission of a crime is as guilty as the person who physically commits it" was not affected

It remained open to a jury to decide whether a person intentionally encouraged or assisted a crime, for example through knowledge that weapons were being carried

The Supreme Court was sitting in joint session with the Privy Council, which hears final appeals from UK overseas territories, in order to consider a joint enterprise case from Jamaica at the same time.

This means the ruling will apply in most UK overseas common law territories.