Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — The British government broke the law by sending key evidence about two alleged ISIS operatives suspected of involvement in the kidnapping and murder of Americans in Syria to U.S. authorities, the U.K. Supreme Court ruled Wednesday.

The ruling will likely delay an international effort to bring members of the execution squad known as "the Beatles" to justice. The group, named by their hostages because of their British accents, are alleged to have been involved in the kidnapping of American aid worker Kayla Mueller and the murder of American journalists James Foley and Steven Sotloff, among others.

El Shafee Elsheikh and Alexanda Kotey, who have been stripped of their British citizenship and banned from returning to the U.K., are alleged to be two of the four Beatles members involved in beheading Western hostages on camera for the Islamic State terrorist group. They are in U.S. custody in Iraq.

The U.K. Supreme Court said the British Home Office caved in to political pressure from the U.S. and breached a data protection law by not ensuring that the men would be spared from the death penalty in the U.S.

Scotland Yard, London's police force, had shared the results of a four-year investigation into the Beatles to help the U.S. Justice Department prosecute Elsheikh and Kotey because there was "insufficient evidence" to do so in the U.K. British prosecutors have been loath to repatriate ISIS fighters unless there is an airtight case that will ensure that they will stay behind bars for life.

The British government may now have to ask the U.S. to return the evidence and will not be allowed to aid in an American prosecution without further reassurances about the death penalty.

Sajid Javid, the previous home secretary, had wanted to help the U.S. prosecute the men in part because U.S. terrorism statutes make it easier to prosecute the cases and convictions can carry longer sentences than in the U.K. He decided not to seek reassurances that the men would be immune from the death penalty, according to documents filed in British court.

Sir Kim Darroch, then the British ambassador to Washington, wrote Javid in May 2018 expressing concern that senior Trump administration officials at the time, specifically Attorney General Jeff Sessions, Defense Secretary Jim Mattis and Secretary of State Mike Pompeo, would not be receptive to a British request that the men avoid the death penalty.

"Their reaction is likely to be something close to outrage," Darroch warned, adding that it might "wind up" President Donald Trump.

"They already feel that we are dumping on them a problem for which we should take responsibility. They have been signaling to us for weeks now that we are in no position to attach any conditions to this," he wrote.

Sessions met Javid on May 30, 2018, and told him that the U.S. should not be left to assume responsibility for "other nations' terrorist fighters," the documents said.

According to the documents, Sessions said that "if the U.S. were to be willing to try El Sheikh in a civilian court as opposed to a military one, he could not see how the U.S. could do that without the U.K. evidence or without recourse to the death penalty."

Javid wrote to Sessions confirming that he had no objection to the death penalty in June 2018.

Download the NBC News app for breaking news and politics

Soon after that information became public, Elsheikh's mother, Maha Elgizouli, sought an injunction in the High Court of Justice, which was granted while her case was heard, halting the handover of any further material.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

However, Elgizouli's case was turned down in January 2019, which prompted an appeal to the Supreme Court. The case was heard in July, and the Supreme Court judgment was handed down Wednesday.

In his judgment, Lord Robert Carnwath concluded that the information in question was transferred "without any safeguards at all."

He said the decision was based on "political expediency, rather than consideration of strict necessity under the statutory criteria."

The court criticized the British government for abandoning a "principled approach" to the death penalty because it was "coming under, and might become susceptible to, political pressure from the U.S."

The justices said there were suggestions that "pragmatic considerations, at the expense of a principled approach, might begin to influence the UK's reaction to the demand that it should cease its lobbying in relation to the death penalty assurances."

The justices also questioned whether the government's claim to be "securing justice for the families," referring to the loved ones killed by ISIS, was accurate when some of the families wished to avoid the death penalty.

"The species of justice that the families wished to have was one where there was not the possibility of the imposition of the death penalty. The decision not to seek assurances opened up that very possibility," the justices said.

"To fulfill their wishes, it was surely required that the hallowed practice of seeking death penalty assurances be observed."

British police had already taken 600 statements, some of which were shared with U.S. prosecutors, before Elsheikh's mother managed to block any further cooperation.

In a statement, Elgizouli thanked the court for its careful consideration of her appeal and recognized "the difficult issues it raises."

Her lawyers, Birnberg Peirce & Partners, said Elgizouli "has always expressed her belief that her son, if accused, should face justice, and that any trial should take place in the U.K."

Her case was backed by Reprieve, a charity that campaigns against the death penalty.

Maya Foa, director of Reprieve, 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 spokesman 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.

"We are clearly very disappointed with today's judgment and are carefully considering next steps."

A hearing date will be set for the court to decide what remedial order should be imposed.

The Beatles are said to be responsible for executing 27 victims in a series of gruesome videos posted on the internet dating back to August 2014.

All wore masks during their dealings with the hostages, but British and U.S. intelligence are said to have established their identities.

Mohammed Emwazi, known as Jihadi John, was killed in a U.S. airstrike on Nov. 12, 2015, after the capture of Aine Davis in Turkey five days earlier.

Kotey and Elsheikh were captured by Kurdish forces in Syria in January 2018.

The British court was told that the Crown Prosecution Service decided in 2016 that there was enough evidence to charge Kotey with five counts of murder and eight of hostage-taking but not enough to charge Elsheikh.

Wednesday's judgment was the first to be delivered by video online because of the coronavirus pandemic.

"Obviously, it would be preferable that the judgment be delivered in open court, but, in the present circumstances, that is simply not feasible," said one of the justices, Lord Brian Kerr.

"The court is determined that, with the enormous help and dedication of our IT staff, we will continue to discharge our duty in the administration of justice."

Elsheikh's mother has tried to force the Crown Prosecution Service to charge her son because she wants to see him returned to Britain, and it is expected to make a decision in the next few weeks.

Kotey's family has chosen to take no part in the legal challenge.