An F-35B aircraft. (Petros Karadjias/Pool/EPA-EFE/Shutterstock)

The Pentagon said Friday that it would stop training Turkish pilots to fly F-35 aircraft because Turkey has persisted in its plans to acquire a sophisticated air defense system from Russia.

The 42 Turkish pilots have been training in Arizona and Florida since last year, in anticipation of shipment of the first of 100 F-35s Ankara has contracted to buy. The pilots are now required to leave the United States by July 31.

In a letter Thursday to his Turkish counterpart, acting defense secretary Patrick Shanahan said that Turkish personnel also cannot participate in management activities related to the F-35 program, a consortium of a number of allied countries, each of which is responsible for building parts of the aircraft.

Turkish companies currently produce almost 1,000 parts for the F-35, including landing gear and fuselage components. The Pentagon is working with Lockheed Martin, the plane’s manufacturer, to find new manufacturers for parts that have been made in Turkey.

The announcement was the latest salvo in disputes between the two NATO allies over a range of issues, including U.S. support for Syrian Kurdish fighters who have been the main ground force in the campaign against the Islamic State in Syria. Negotiations over a withdrawal of the Kurdish fighting group, which Turkey considers a terrorist organization, are ongoing.

U.S. officials have said they remain hopeful the Kurdish situation can be resolved. But optimism over the defense purchases is fading fast.

In his letter to Turkish Defense Minister Hulusi Akar, Shanahan said there was still time for Turkey “to change course on the S-400.”

But “while we seek to maintain our valued relationship,” he wrote, “Turkey will not receive the F-35 if Turkey takes delivery” of the $2.5 billion Russian system.

The Trump administration and NATO have said that having the S-400 system in proximity to the F-35, America’s most advanced fighter, would allow Moscow to learn too much about the aircraft’s radar profile and potential vulnerabilities.

Turkey has rejected that argument and said it could keep the two safely separate. It maintains that a $3.5 billion U.S. counteroffer to sell it a Patriot missile defense system has come too late, is too expensive and lacks required co-production stipulations.

Turkish President Recep Tayyip Erdogan has repeatedly called the 2017 S-400 purchase a sovereign decision and a “done deal.” Sergey Chemezov, the head of Russia’s state-owned defense development conglomerate, Rostec, said in a Moscow television interview Friday that Turkish personnel had already completed training in Russia on the S-400 and that “I hope we will begin deliveries . . . in two months.”

In addition to threatening F-35 security, Shanahan said, the Russian purchase “will hinder your nation’s ability to enhance or maintain cooperation with the United States and within NATO, lead to Turkish strategic and economic over-dependence on Russia, and undermine Turkey’s very capable defense industry and ambitious economic development goals.”

Turkish and U.S. officials have engaged in intense negotiations over the past several months, with the United States trying to sweeten its Patriot offer. Turkish officials have said they would be happy to buy both systems. But Ankara has questioned the Patriot’s price tag and U.S. ability to guarantee delivery in time to meet what both sides agree are Turkey’s urgent defense needs.

Congress has also threatened sanctions against Turkey, under a 2017 law signed by President Trump, if it goes through with the Russian purchase.