WASHINGTON — The Pentagon on Friday told Turkey that it is cutting off Ankara’s purchase of F-35 fighter jets if the Turkish government goes ahead with plans to buy a Russian missile defense system, ratcheting up what has been a lengthy, heated dispute between the two NATO allies.

In a sharp two-page letter, Acting Defense Secretary Patrick Shanahan said the training of Turkish pilots will end July 31 and Turkey would not be allowed to take final possession of the four F-35 aircraft it bought. Shanahan also warned that Ankara’s purchase of the Russian system could hamper America’s future relationship with Turkey, which has been a critical U.S. partner and base for combat operations, including for the war in Syria.

“Turkey’s procurement of the S-400 will hinder your nation’s ability to enhance or maintain cooperation with the United States and within NATO,” Shanahan said in a letter to Turkish Defense Minister Hulusi Akar that was released Friday. The S-400 purchase, he added, will “lead to Turkish strategic and economic over-dependence on Russia.”

Shanahan also warned that his decision to end Turkey’s participation in the F-35 program could be followed by other U.S. actions, saying that members of Congress support imposing sanctions on the Turks. Sanctions, he said, could threaten President Donald Trump’s commitment to more than triple U.S. trade with Turkey.

Shanahan and other U.S. defense officials stressed that these decisions are not irreversible and that conditions can return to normal if Turkey forgoes the Russian system.

The U.S. has repeatedly warned Ankara that the Russian system is considered a threat to the F-35. But Turkish leaders have moved steadily along with the purchase, calling it a “done deal.” U.S. officials say Turkey should buy the American Patriot missile system instead, but those negotiations have appeared to make little progress.

Akar told reporters late last month that Turkish military personnel are already receiving training on the S-400 and that Ankara was “making preparations” and “considering all options” against possible U.S. sanctions on Turkey over the purchase.

Turkish leaders suggested last month that they were talking with the U.S. about a proposal for the establishment of a joint committee to review the S-400s possible risks to the U.S. F-35 program.

But on Friday, Ellen Lord, defense undersecretary for acquisition, said flatly that the U.S. has made it clear that “we are not going to discuss technical mitigations to the S-400.”

Asked if the U.S. will reimburse Turkey for the four fighter jets it bought, Lord said those details are being worked out. She added that the fact that the two nations continue to have discussions and exchange letters on the matter suggests that there is a desire to find a way forward.

READ MORE: Turkey doesn’t have to choose between U.S. and Russia, foreign minister says