US President Donald Trump threatened Friday to release ISIS terrorists detained in Syria on the European border if France, Germany and other European countries do not take back their nationals.

"I defeated the Islamic State terrorist organization," Trump told reporters as he met Australian Prime Minister Scott Morrison at the White House.

"Now we have thousands of prisoners of war and foreign ISIS fighters detained by the SDF."

"We ask the countries that came from them in Europe to retrieve the prisoners of war," he said.

"So far they have refused," he said, referring specifically to France and Germany.

Speaking of a threat, Trump told the Europeans: "In the end I will say, 'I'm sorry, but you either get them back or we will bring them back to your borders'."

He said he would do so "because the United States will not imprison thousands of people who have been captured at Guantanamo and will not keep them in prison for 50 years" because it will cost "billions and billions of dollars."

“We have done a great service for the Europeans. "If they refuse to take them back, we probably have to send them to the border and they will have to have their families again."

This is not the first time that Trump threatens the Europeans. Last September, the US president threatened to transfer European terrorists detained in Syria to their country and release them if European countries did not take them back.