President Donald Trump has warned that Islamic State fighters held by U.S.-backed forces could be released to Europe if their home countries fail to take them back.

His comments raise the pressure on European powers who have been reluctant to repatriate nationals accused of fighting for ISIS due to security concerns and the difficulty of obtaining sufficient evidence for prosecution.

"We have thousands of ISIS fighters that we want Europe to take, and let's see if they take them. If they don't take them, we'll probably have to release them to Europe," Trump told reporters on Thursday.

It is unclear how many ISIS fighters of European origin are in detention and how Trump would release them to Europe.

Experts estimate U.S.-backed Syrian Democratic Forces hold some 800 European ISIS fighters in makeshift prisons, but the mostly Kurdish militia group is struggling to maintain them more than four months after ISIS lost the last significant part of its so-called caliphate.

The SDF is also involved in caring for thousands of the fighters’ family members stuck in desert camps in Syria, prompting calls for a long term solution and stoking tension between Washington and its European allies.

Thousands of foreign nationals were lured to the Middle East to join ISIS when it emerged in 2014 and took control of vast swathes of territory stretching across both Syria and Iraq.

U.S.-backed fighters in Syria declared victory over the group in March.

Trump had previously called on European capitals to take their fighters back and put them on trial.

Britain’s former envoy to Washington reportedly wrote last year that the U.S. feels “we are dumping on them a problem for which we should take responsibility,” according to leaked diplomatic cables.

Kim Darroch’s comments were in relation to the prosecution of two British ISIS members — nicknamed the Beatles — accused of gruesome murders in Syria.

This week Britain’s Supreme Court ruled that there was enough evidence to prosecute the pair in the U.K. after concerns that a U.S. trial could result in the death penalty, which Britain opposes.

Britain has also been accused of “human fly-tipping” — a British term for dumping trash — after it stripped Shamima Begum, the wife of an ISIS fighter, of British citizenship, leaving her stranded in a Syrian refugee camp while pregnant. Her baby died soon after birth.

“You have dishonourably left it to the Kurdish people to bear the financial and security burden of Shamima’s safety and upkeep,” her lawyer Mohammed Akunjee said in a statement in May.

“Your cynical decision amounts to human fly-tipping.”

Sweden and the Netherlands have proposed an international tribunal to try ISIS fighters, a call backed by the SDF. The proposal is set to be discussed on the sidelines of the United Nations General Assembly in September.