The British government acted unlawfully by handing the US information on two suspected Isis terrorists without assurances that the death penalty would not be used, the Supreme Court has ruled.

She launched the legal challenge after the UK granted a request for mutual legal assistance (MLA) from US authorities over Mr El Sheikh and another alleged member of the terror cell, Alexanda Kotey.

They became the subject of a legal dispute in 2018 as the UK refused to prosecute them, having removed their British citizenship, despite pressure from Donald Trump’s administration.

Ministers said the Crown Prosecution Service (CPS) concluded that there was “insufficient evidence” to prosecute the pair in Britain and so the government decided to hand its information to the US.

Timeline of the Isis caliphate Show all 19 1 /19 Timeline of the Isis caliphate Timeline of the Isis caliphate ISIS began as a group by the merging of extremist organisations ISI and al-Nusra in 2013. Following clashes, Syrian rebels captured the ISIS headquarters in Aleppo in January 2014 (pictured) AFP/Getty Timeline of the Isis caliphate Abu Bakr Al-Baghdadi declared the creation of a caliphate in Mosul on 27 June 2014 Timeline of the Isis caliphate Isis conquered the Kurdish towns of Sinjar and Zumar in August 2014, forcing thousands of civilians to flee their homes. Pictured are a group of Yazidi Kurds who have fled Rex Timeline of the Isis caliphate On September 2 2014 Isis released a video depicting the beheading of US journalist Steven Sotloff. On September 13 they released another video showing the execution of British aid worker David Haines Timeline of the Isis caliphate The US launched its first airstrikes against Isis in Syria on 23 September 2014. Here Lt Gen William C Mayville Jnr speaks about the bombing campaign in the wake of the first strikes Getty Timeline of the Isis caliphate Isis militants sit atop a hill planted with their flag in the Syrian town of Kobani on 6 October 2014. They had been advancing on Kobani since mid-September and by now was in control of the city’s entrance and exit points AFP/Getty Timeline of the Isis caliphate Residents of the border village of Alizar keep guard day and night as they wait in fear of mortar fire from Isis who have occupied the nearby city of Kobani Getty Timeline of the Isis caliphate Smoke rises following a US airstrike on Kobani, 28 October 2014 AFP/Getty Timeline of the Isis caliphate YPG fighters raise a flag as they reclaim Kobani on 26 January 2015 VOA Timeline of the Isis caliphate Isis seized the ancient Syrian city of Palmyra on 20 May 2015. This image show the city from above days after its capture by Isis Getty Timeline of the Isis caliphate Kurdish forces are stationed on a hill above the town of Sinjar as smoke rises following US airstrikes on 12 November 2015 AFP/Getty Timeline of the Isis caliphate Kurdish forces enter Sinjar after seizing it from Isis control on 13 November 2015 AFP/Getty Timeline of the Isis caliphate Iraqi government forces make the victory sign as they retake the city of Fallujah from ISIS on 26 June 2016 Getty Timeline of the Isis caliphate Iraqi forces battle with Isis for the city of Mosul on 30 June 2017 AFP/Getty Timeline of the Isis caliphate Members of the Iraqi federal police raise flags in Mosul on 8 July 2017. On the following day, Iraqi prime minister Haider Al Abadi declares victory over Isis in Mosul Getty Timeline of the Isis caliphate Members of Syrian Democratic Forces celebrate in Al-Naim square after taking back the city of Raqqa from Isis. US-backed Syrian forces declare victory over Isis in Raqqa on 20 October 2017 after a four-month long campaign Getty Timeline of the Isis caliphate Female fighters of the Syrian Democratic Forces celebrate in Al-Naim Square after taking back the city of Raqqa from Isis. US-backed Syrian forces declare victory over Isis in Raqqa on 20 October 2017 after a four-month long campaign AFP/Getty Timeline of the Isis caliphate Trucks full of women and children arrive from the last Isis-held areas in Deir ez-Zor, Syria in January 2019 They were among the last civilians to be living in the ISIS caliphate, by this time reduced to just two small villages in Syria’s Deir ez-Zor Richard Hall/The Independent Timeline of the Isis caliphate Zikia Ibrahim, 28, with her two-year-old son and 8-month-old daughter, after fleeing the Isis caliphate, on Saturday 26 January 2019 Richard Hall/The Independent

The Supreme Court heard that American authorities refused to provide the normal assurance that it would not be used in a prosecution that could lead to the death penalty.

After “many exchanges”, the home secretary - then Sajid Javid - agreed to comply with the request without any assurances in June 2018.

He authorised the sharing of 600 witness statements gathered by the Metropolitan Police in a letter to then US attorney general Jeff Sessions, which sparked intense criticism after being leaked to the press.

The Supreme Court ruled that the decision was unlawful under the Data Protection Act (DPA) because the conditions of transfer to a non-EU country had not been met.

Lord Kerr delivered the judgment remotely because of the coronavirus outbreak on Wednesday.

“The Supreme Court unanimously allows the appeal on the second ground,” he said. “Such processing is only lawful where it complies with the data protection principles in section 34 DPA … the information in question was transferred without being based on sufficient safeguards and without the requisite assessment of whether special circumstances justifying the transfer existed.”

A separate judgment by Lord Carnwath’s found that the British government’s decision to comply with the US request was “based on political expediency, rather than strict necessity under the statutory criteria”.

When the case was first heard in the High Court, which rejected the appeal, lawyers for Ms Elgizouli said Mr Javid’s actions were influenced by the “anticipated outrage” of members of the Trump administration if the MLA was refused.

Isis 'Beatles' militants captured in Syria: 'It is too late for a fair trial'

The first ground of appeal, which was backed by Lord Kerr but rejected by other Supreme Court judges, was that it violated common law to “facilitate the imposition of the death penalty” in a foreign state.

Mr El Sheikh and Mr Kotey were transferred into US custody in October following Turkey’s invasion of the region of northern Syria where they were being held by Kurdish-held forces.

Birnberg Peirce Solicitors, who represented Ms Elgizouli, said: “She has always expressed her belief that her son, if accused, should face justice; and that any trial should take place in the UK.

“She has been asking since November 2018 for the CPS to conduct a review of the claim that there was insufficient evidence for him to be charged and tried in the UK – a review that the CPS now says should be completed by April 2020.”

Originally from London, he and Mr Kotey were declared “specially designated global terrorists” by the US State Department ahead of their capture in January 2018, with official documents naming them as members of “The Beatles” and saying the cell had beheaded more than 27 hostages and tortured many more.

Surviving captives have told of their brutality, which included waterboarding, electric shocks, mock executions and crucifixions.

Executioner Mohammed Emwazi, who became known as “Jihadi John”, was killed in a drone strike, while the remaining “Beatle”, Aine Davis, was imprisoned in Turkey.

The legal charity Reprieve intervened in the case, arguing that the Mr Javid's decision undermined wider British diplomatic efforts against executions around the world.

Director Maya Foa said: “This is not only a landmark judgment, but an excellent result for anyone who cares about the rule of law and Britain's long-standing opposition to the death penalty."

A Home Office spokesperson said: “The government’s priority has always been to maintain national security and to deliver justice for the victims and their families. This has not changed.