WASHINGTON — A sustained Turkish military operation against U.S.-backed Kurdish forces in Syria — which President Donald Trump appears to have permitted — would vastly increase the threat to Americans from the Islamic State militant group, which remains intent on attacking the West, current and former intelligence officials tell NBC News.

The immediate concern, officials say, is what will happen with the 12,000 ISIS fighters currently being guarded by the American-backed Kurds. The ISIS prisoners are the world's largest concentration of terrorists. If those fighters are set free, officials fear a replay of what happened in Iraq between 2010 and 2013, when the core group who founded ISIS were released or escaped from detention after U.S. forces left the country.

Some of the very people who broke out of Iraqi prisons helped turn ISIS into a movement that not only seized territory in Iraq and Syria, but also orchestrated and encouraged terrorist attacks in Europe and the United States.

Asked what would happen if ISIS fighters escape and pose a threat elsewhere, Trump told reporters Wednesday, "Well they are going to be escaping to Europe, that's where they want to go. They want to go back to their homes."

Trump also said the U.S. was "taking some of the most dangerous ISIS fighters out. Two U.S. officials confirmed to NBC News late Wednesday that the two U.K. men known as “the Beatles” have been taken into U.S. military custody after the Turkish incursion posed a security threat to their detention, as first reported by the Washington Post.

“The Beatles” are accused of having participated in the ISIS executions of Western hostages, including American journalist James Foley. A DoD official confirms “two high value ISIS individuals” were moved from Syria. The Pentagon negotiated the transfer with the SDF to ensure the “odious individuals are secure.”

The official also said the two are "being held in U.S. military custody pursuant to the law of war."

More broadly, current and former officials say, a large Turkish military incursion into northern Syria will have the effect of removing the single greatest source of counterterrorism pressure against ISIS — a Kurdish force that has been crucial to defeating and containing the terror group.

Asked about the risks, U.S. intelligence officials chose their words carefully Wednesday, not wanting to say anything publicly that appears to criticize Trump's policies. But they did not dispute what one of the top counterterrorism officials in the government told NBC News last month — that ISIS remains a dangerous threat, and that reduction of counterterrorism pressure on the group would "set the conditions for potential reemergence in a very powerful way."

"They are absolutely still a viable external operational threat globally," the official, who chose not to be identified, said.

Just days before Trump ordered U.S. troops to withdraw from the border region of northern Syria, a bipartisan team appointed by Congress, the Syria Study Group, issued a report warning that an American pullout would take the pressure off the terrorists.

"There's ample evidence ISIS is still very much active, it has access to tremendous resources, its brand still has international appeal," said Dana Stroul, co-author of the Syria Study Group report and a senior fellow at the Washington Institute for Near East Policy think tank.

"We know that ISIS is looking for opportunities to reconstitute and certainly the lifting of pressure on ISIS is likely to provide the organization with that opportunity."

The report said that ISIS had lost its grip on territory in Syria and Iraq but had "morphed into an insurgency with the will, capability, and resources to carry out attacks against the United States."

Apart from ISIS, al Qaeda-linked groups and other extremists are active in Syria, taking advantage of the chaos of the country's civil war, according to the report.

"Areas of Syria have become safe havens for al Qaeda and its fellow travelers and home to the largest concentration of foreign terrorist fighters since Afghanistan in the 1990s," the report said.

Current and former officials also expressed frustration over what they see as a profound betrayal of the Kurdish force — which fought under the rubric of the Syrian Democratic Forces — that lost thousands of men fighting to defeat the ISIS caliphate on behalf of the United States.

"I've worked directly with the SDF and had many fighters from the group I grew to trust with my life," a former CIA officer told NBC News. "Now, I realize they are all going to be killed or detained after we betrayed them — killed with weapons we gave to Turkey."

Tom Donilon, who was President Barack Obama's national security adviser, told Andrea Mitchell on MSNBC, "We have given a green light to the Turks to come and fight our allies. … It's a real stain on the reputation of the United States."

Some analysts see it differently, pointing out that U.S. backed Kurdish forces are linked to the PKK, a Kurdish military group that has been designated as a terrorist organization by the U.S. and the European Union. Turkey has been fighting the group for decades, they say, and there was always going to be a day of reckoning, unless the U.S. planned to keep troops in Syria forever.

The former CIA officer said in response: "They trusted us and believed us. If we didn't intend to honor our promise, we should not have made it."

The White House declined to comment, but referred NBC News to a previous statement by Trump:

"Turkey has committed to protecting civilians, protecting religious minorities, including Christians, and ensuring no humanitarian crisis takes place — and we will hold them to this commitment. In addition, Turkey is now responsible for ensuring all ISIS fighters being held captive remain in prison and that ISIS does not reconstitute in any way, shape, or form. We expect Turkey to abide by all of its commitments, and we continue to monitor the situation closely."