In a move that Bloomberg has defined as "signalling a turn away from the NATO military alliance that has anchored Turkey to the West for more than six decades" Turkey agreed to pay $2.5 billion to acquire Russia’s most advanced missile defense system, a senior Turkish official told Bloomberg on Thursday. The proposed deal which was first reported here back in November 2016, has been finalized and the preliminary agreement sees Turkey receiving two S-400 missile batteries from Russia within the next year, then producing another two inside Turkey.

For Ankara, which has had a dramatic falling out with its NATO partners over the past year, the missile deal with Russia “is a clear sign that Turkey is disappointed in the U.S. and Europe,” said Konstantin Makienko, an analyst at the Center for Analysis of Strategies and Technologies, a Moscow think-tank. “But until the advance is paid and the assembly begins, we can’t be sure of anything.” Furthermore, the Russian system would not be compatible with other NATO defense systems, but just as importantly wouldn’t be subject to constraints imposed by the alliance, which prevent Turkey from deploying such systems on the Armenian border, Aegean coast or Greek border. The Russian deal would allow Turkey to deploy the missile defense systems anywhere in the country, a move which will prompt a cry of outrage from Turkey's neighbors, especially Greece.

So what does Turkey get in exchange for $2.5 billion? First and foremost, Russia's most advanced technology or know-how, a Turkish official quoted by Bloomberg said. Turkey wants to be able to produce its own advanced defense systems, and the Russian agreement to allow two of the S-400 batteries to be produced in Turkey would serve that aim. For Russia there is little to lose from the deal as the US most likely already has the full details of the system, however they are obviously kept secret from US NATO allies, especially someone as volatile as Turkey.

“There are a lot of different levels of technology transfer,” and any offer to Turkey would probably be limited in terms of sophistication, said Makienko, the Moscow-based analyst. For Russia, the potential risk from the transaction contained: “For Turkey to be able to copy the S-400 system, it would have to spend billions to create a whole new industry.”

According to Bloomberg, the S-400 is designed to detect, track and then destroy aircraft, drones or missiles. It’s Russia’s most advanced integrated air defense system, and can hit targets as far as 250 miles away. Russia has also agreed to sell them to China and India, both nations who are masters at reverse engineering.

As further reported, Turkey and Russia are currently sorting out technical details and it could take about one year to finalize the project, although one battery may be available earlier if Russia decides to divert it from another country. The missiles are not ready to sell off-the-shelf and Russia will have to produce the batteries before delivering them.

Most concerning for NATO, however is that the systems delivered to Turkey would not have a friend-or-foe identification system, which means they could be deployed against any threat without restriction.

Meanwhile, news of the deal are likely to strain relations between Turkey and NATO to the point of breaking, if not beyond. Disagreements between Turkey, which has the second-largest army by personnel numbers in NATO, and the U.S., the bloc’s biggest military, have also impacted business. No U.S. companies bid for a Turkish attack helicopter contract in 2006 after Turkey insisted on full access to specific software codes, which the U.S. refused to share, considering it a security risk. Turkey partnered with Italy instead in a $3 billion project to co-produce 50 attack helicopters for its army.

And now, very symbolically, it has picked the sworn enemy of NATO: Russia.

There is still a chance, however slim, that the deal will fall apart:

Turkey has reached the point of an agreement on a missile defense system before, only to scupper the deal later amid protests and condemnation from NATO. Under pressure from the U.S., Turkey gave up an earlier plan to buy a similar missile-defense system from a state-run Chinese company, which had been sanctioned by the U.S. for alleged missile sales to Iran.

That said, such an outcome is unlikely as it will be seen as caving to Erdogan's hard-knuckled negotiating style, something a "resurgent" Europe under the new ownership of Merkel and Macron will not allow.