The two British Isis members accused of involvement in the beheading of western hostages are being taken to Iraq by the US military as the Turkish offensive in north-east Syria enters its second day.

Alexanda Kotey and El Shafee Elsheikh were members of a British group of Isis militants known as “the Beatles”. They were seized overnight, with lawyers predicting that their transfer to Iraq would be a precursor to them being taken to the United States.

Details remain sketchy, but western officials confirmed that the two Britons have been taken across the border, after previously being held in detention by Syrian Kurdish forces, the Syrian Democratic Forces (SDF).

Overnight, Donald Trump announced that the two had been moved, tweeting:

In case the Kurds or Turkey lose control, the United States has already taken the 2 ISIS militants tied to beheadings in Syria, known as the Beetles, out of that country and into a secure location controlled by the U.S. They are the worst of the worst! — Donald J. Trump (@realDonaldTrump) October 10, 2019

The two are understood to be part of a larger group moved by the US, with some reports saying it numbered around 40 Isis fighters. Earlier, Trump had said the US had “taken a certain number of Isis fighters that are particularly bad, and we’ve wanted to make sure that nothing happened with them with respect to getting out”.

The duo were part of a group of four who are accused of being involved in the apparently filmed beheadings of British aid workers David Haines and Alan Henning and US journalists James Foley and Steven Sotloff.

James Foley’s mother, Diane, said on Thursday she hoped that they would face prosecution in the US. “We need some semblance of justice for the horrific execution and torture of the Americans,” Foley told the Associated Press.

Clive Stafford Smith, a human rights lawyer, said: “I think Iraq is a stopping point, and they are heading for Virginia in the United States, where they will very likely face a death penalty trial.”

The UK does not normally allows its citizens to be extradited if they will face a death penalty charge, but when he was home secretary, Sajid Javid said he would not longer seek such assurances from the US in the cases of Kotey and Elsheikh.

Kotey, left, and Elsheikh, read a news article about themselves during an interview with The Associated Press at a security center in Kobani, Syria in 2018. Photograph: Hussein Malla/AP

Elsheikh’s mother challenged that decision, taking her case to the supreme court in London, to try to prevent the two men being extradited to the US and instead put on trial in their home country. Judgment in that case is awaited.

Stafford Smith said that taking prisoners across a border without due process amounted to an illegal rendition, but the lawyer, who has acted in a string of Guantánamo Bay cases, said he believed the US would allow a trial to go ahead.

“Kidnapping people is illegal, but the question is whether that will be enforceable in the US courts,” he said.

Overnight Trump said that he had spoken to the British prime minister, Boris Johnson, on the subject of Isis prisoners, but did not say whether he was referring to Kotey and Elsheikh.

There were also indications that the UK had been briefed in advance of the US operation, although a Home Office spokesperson said on Thursday: “It would be inappropriate to comment whilst legal proceedings are ongoing.”

The other members of the “Beatles” group included its leader, Mohammed Emwazi, who was killed in a US drone strike in 2015, and Aine Davis, who was caught in Turkey and jailed for seven and half years in 2017 for being a member of a terrorist organisation.

Estimates vary about the number of foreign Isis fighters held by the SDF, but there are at least 1,000 and potentially double that. There are also an estimated 10,000 or so Isis fighters from Syria and Iraq being held.

Many of the jails are near the border, although SDF sources denied reports that the prisons had been hit by Turkish shells. Attacks had taken place in the immediate vicinity, they said.

Security sources estimate there are around 30 Britons held in Isis jails, and the UK has largely pursued a policy of ignoring them. It argues that they travelled at their own risk to Syria, a country where there has been no consular support since the start of the civil war in 2011.

One of those held is Jack Letts, who was raised in Oxfordshire and fled to join Isis before he was picked up in 2017. His British citizenship was stripped by the UK government over the summer, leaving him with his Canadian nationality inherited from his father. His situation is unclear.

Turkey’s ambassador to the UK, Ümit Yalçın, said that Turkey was committed to the fight against what he described as the terrorists of Isis and the Syrian Kurds, and said that if Turkish forces were to take control of Isis prisoners, Ankara would seek to return them to their country of origin.

“We need a sustainable solution for all foreign fighters. Nobody can wash their hands of them,” he added. Some of the prisons, such as in the administrative centre of Qamishli are close to the Turkish border and well within any 50 mile exclusion zone.

Former MI6 chief Sir John Sawers said the British government had allowed the situation to fester, and the two ‘Beatles’ should be put on trial in the UK, rather than be taken to the US.

“Frankly, it was only ever a temporary solution to leave them in a camp in the desert in Syria. I think, ultimately, they ought really to be brought back to their home countries to face justice here,” the ex spy chief said.

There had been repeated warnings that the Turkish invasion meant Isis fighters could end up being released by one of the parties to the looming conflict, but Trump’s words suggest that the US intends to mitigate some of that risk.

British and European officials have said they fear that trials in home countries could prove difficult because the offences took place overseas, in Syria and Iraq, and the witnesses and evidence are in those countries.