The US Senate has approved a major defence bill that blocks the sale of F-35 fighter jets to Turkey unless it abandons a deal to buy S-400 missile-defence systems from Russia.

In a rare bipartisan effort by both the Senate and the House of Representatives, the new legislation contains a provision to block President Donald J. Trump‘s deal with China to allow telecommunications giant ZTE to stay in business despite the fact that it violates the US’ sanctions against Iran and North Korea.

The two provisions targeting Turkey and ZTE are part of The massive National Defense Authorization Act, which authorises over $700 billion in defence spending on military programs and weapons.

Turkey is currently one of the partner countries in the F-35 program and had plans to buy about 100 of the cutting-edge stealth fighters. Relations between the Turks and their NATO are at an all-time low, however, due to moves by the country’s autocratic President Recep Tayyip Erdogan to align the country’s foreign policy positions with Russia and Iran. Erdogan’s severe crackdown on civil society through mass purges and arrests since a failed coup against his government in July 2016 have deeply alarmed the West.

In recent years, Erdogan has become increasingly aggressive in his tone towards the US, EU, and Israel. Over the past several months, Turkey’s military operations have seen Turkish naval vessels blocking international companies from operating oil rigs off the coast of Cyprus and its land forces kidnapping Greek soldiers on the country’s northern border with Greece.

Erdogan also ordered his NATO-trained army to launch a major Jnaury offensive against Syria’s Kurds, the US’ main ally in northern Syria and lynchpin in the West’s campaign against ISIS. The heavy-handed offensive and incessant bombing of the Syrian Kurdish militias, the YPG, angered both Washington and Brussels, who sharply criticised Erdogan for preferring to settle personal scores with the Kurds – whom he regards as a bigger threat than ISIS or Syrian dictator Bashar al-Assad.

The Senate bill would prevent delivery of the jets unless Trump certifies that Turkey is not threatening NATO, purchasing defense equipment from Russia, or detaining U.S. citizens. The House of Representatives passed its own version of the bill, and a compromise measure is expected to be passed and sent to Trump for his signature or veto.

Turkish Prime Minister Binali Yildirim said on June 19 that the Senate’s bill violated the spirit of strategic partnership between Washington and Ankara, but said  Turkey would pursue an alternative track in providing its armed forces with equipment.

NATO officials have repeatedly warned Turkey that the Russian S-400 system that it agreed to buy in 2016 is not compatible with NATO defence standards. Erdogan – whose Islamist AK Party has been in power for almost two decades – has repeatedly ignored and has employed bellicose rhetoric that has challenged the West to try and stop him from proceeding with the Russian deal.