The military is holding the two men, part of a cell notorious for beheading its hostages, at an undisclosed location.

The United States has taken custody of two high-profile members of the Islamic State of Iraq and the Levant (ISIL or ISIS) armed group who became notorious for beheading hostages and boasting about it in videos.

The two men, previously held in Syria by Kurdish-led fighters, were moved out of the country as Turkey started an offensive there.

“I can confirm that we’ve taken custody of two high-value ISIS individuals from the SDF,” a defence official told AFP news agency on Wednesday on condition of anonymity, referring to the Kurdish-led Syrian Democratic Forces.

“They have been moved out of Syria and are in a secure location,” the official said, without identifying where. “They are being held in military custody pursuant to the law of war.”

Earlier in the day, US President Donald Trump said a “certain number” of ISIL fighters had been removed from Syria, amid concerns that Kurdish-led fighters would be unable to keep guarding the prisoners as the Turkish operation continued.

“We are taking some of the most dangerous ISIS fighters out and we’re putting them in different locations where it’s secure,” Trump said at the White House.

Turkey has launched an assault on the Syrian-Kurdish forces – US allies in the fight against ISIL – sparking fears that the offensive could lead to captured fighters escaping and reconstituting the group.

US media reports identified the two as El Shafee Elsheikh and Alexanda Amon Kotey; part of an extremely violent four-man cell that kidnapped and tortured foreigners, including journalists, at the height of ISIL’s power in Syria and Iraq.

One other person was killed in a drone attack and the fourth is in prison in Turkey.

‘Nobody wants them’

In 2014 and 2015, the armed fighters held more than 20 Western hostages in Syria and tortured many of them. It beheaded seven American, British and Japanese journalists and aid workers and a group of Syrian soldiers, boasting of their butchery in videos released to the world.

The SDF have imprisoned some 10,000 ISIL fighters, about 2,000 of them with foreign nationalities and many of those from European countries that have refused to take them back.

Trump said the Kurds were still guarding many of the captured fighters, but also said Turkey would be responsible for them.

“If the Kurds don’t watch, Turkey will watch. They don’t want those people out any more than we do,” he said.

Trump and other US officials have repeatedly pressed other nations across Europe and the Middle East to take back the detainees who are their nationals, but international leaders have proved reluctant to do so.

“They should go back, by the way, they should go back to Europe. Many of them came from Europe. And they should go back to Germany and France,” Trump said on Wednesday.

Trump said other leaders told him they did not want the detainees.

“We don’t want them either,” he said. “Nobody wants them but they’re bad and somebody has to watch over ’em.”