U.S. Director of National Intelligence James Clapper told the Aspen Security Forum on Thursday that Turkey’s purge of the military, after the coup that failed to overthrow President Recep Tayyip Erdogan, is hindering efforts to fight the Islamic State (ISIS).

Clapper said the purge has “swept aside many Turkish officers who dealt with the United States and landed some of them in jail,” according to a Reuters report. Turkey has issued dishonorable discharges to almost 1,700 military personnel, including about 40 percent of its top officers.

“It’s having an effect, because it’s affected all segments of the national security apparatus in Turkey. Many of our interlocutors have been purged or arrested. There’s no question this is going to set back and make more difficult cooperation with the Turks,” said Clapper.

General Joseph Votel, head of the U.S. Central Command, agreed that some of the Turkish military officers who have worked with the United States have been jailed.

“We’ve certainly had relationships with a lot of Turkish leaders, military leaders in particular. I am concerned about what the impact is on those relationships as we kind of continue to move forward,” said Votel.

The most immediate concerns are Incirlik Air Base, which the United States is using to launch airstrikes against ISIS targets in Syria, a CIA base in Turkey that has been used to support Syrian rebels aligned with the U.S. and radar installations that are part of NATO’s missile defense system. Power to the Incirlik airbase was cut off for several days after the coup was put down.

According to Bloomberg News, NATO’s Supreme Allied Commander Europe, Curtis Scaparrotti, has spoken with Turkish military chief Hulusi Akar since the coup, and was told the current situation is “stressful,” but Akar offered a “positive” outlook. The Turkish commander also reaffirmed Turkey’s commitment to NATO.

Scaparrotti said much the same as Clapper and Votel: “Some of the officers that we have our relationships with in Turkey are now either detained, in some cases retired as a result of the coup. We’ve got some work to do there.”

An Erdogan spokesman pointed out that Akar kept his job, along with the top-ranked commanders of the Turkish army, navy, and air force, providing some degree of “continuity” in command.

However, Bloomberg News cites concerns that strained relations with the United States after the coup, particularly if Turkey’s demand for extradition of cleric Fethullah Gulen is refused, could move Turkey into the orbit of Russia. Purging so many officers who have worked closely with the U.S. would make such a realignment easier. Russia and Turkey have been taking steps to patch up their relationship after Turkey shot down a Russian fighter plane along the Syrian border last year.

Erdogan actually responded directly to Clapper’s comments on Friday, and it was not pretty.

“He says that ‘the high ranked officials that we were in contact with have been arrested.’ One should shy away a little; is it up to you to make the decision on this? Who are you? Firstly, you should know your place!” the Turkish president thundered in a speech given at the headquarters of a special operations unit that was attacked during the coup.