The United States on Friday gave Turkey until July 31 to abandon its plan to buy Russian air missiles or risk its pilots from being removed from training for the American F-35 fighter jets. The US has already stopped the delivery of F-35 parts to Turkey, which has signed a deal to buy four aircraft of the model, The New York Times reported.

The US has been upset for months that its ally is buying the S-400 air defence system from archrival Russia. It says Turkey’s acquisition of Russia’s S-400s poses a threat to the Lockheed Martin Corp F-35 stealthy fighters. The United States says Turkey cannot have both.

Turkey has expressed an interest in buying 100 US F-35s and its defence industry has also invested significantly in the warplanes’ production.

Acting US Defense Secretary Patrick Shanahan sent a letter to his Turkish counterpart Hulusi Akar informing him of Washington’s decision. “Turkey still has the option to change course,” she wrote. “If Turkey does not accept delivery of the S-400, we will enable Turkey to return to normal,” she said.

Ellen Lord, undersecretary of defense for acquisition and sustainment, said the deadline “will allow sufficient time for Turkish personnel associated with the F-35 program to be reassigned and depart the United facilitate an orderly cessation of Turkish participation.”

She justified the US deadline by saying that Turkey had already sent its personnel to Russia to start training with the S-400s.

If Turkey does not renounce the deal with Russia by July 31, Turkish companies – which make 937 different parts of the F-35 – will not be given further subcontracts and their roles will be reassigned to other firms, Lord said.

Turkish President Recep Tayyip Erdogan, however, said that his country was “determined” to proceed with the Russia deal. “Unfortunately we haven’t received a positive proposal from the American side on the subject of Patriots like the S-400s from Russia,” he added.

The F-35 is the most expensive program in the history of the US military and was launched in the 1990s, according to AFP. These aircraft are designed to operate in sync and in real time with NATO’s military systems, including anti-missile defences. The US fears that Russia could fine-tune the S-400’s capacities against the Western alliance through information obtained in Turkey.

Last year, India had also signed a deal for the supply of Russia’s S-400 Triumf missile system despite a warning by the United States that it would impose sanctions on India if the agreement went through. Under new US laws, countries that sign deals with Russian defence or intelligence sectors can face secondary sanctions.