ISTANBUL (AFP) - Turkey and Russia are inching towards an accord for the first major Turkish weapons purchase from Moscow, troubling Ankara's allies in Nato even though the deal may not ultimately materialise.

According to Turkish and Russian officials, all preparations have been made for the purchase of a sophisticated S-400 missile defence system, Ankara's most significant accord with a non-Nato supplier.

But despite confident proclamations, the deal has yet to be officially inked.

Analysts remain sceptical over whether Turkey will ever take delivery of the surface-to-air missile defence batteries. Some argue the message sent to the West matters more than the actual acquisition.

The Pentagon has already sounded alarm, saying bluntly that "generally it's a good idea" for Nato allies to buy inter-operable equipment.

But President Recep Tayyip Erdogan boasted that "God willing we will see the S-400s in our country".

Erdogan has argued that Turkey's fellow Nato member and occasional regional foe Greece has Russian-made S-300 batteries on its southern island of Crete, originally bought by Cyprus in the late 1990s but passed on to Greece to prevent escalation on the divided island.

Dmitry Shugaev, the head of Russia's military-technical cooperation agency, told the Kommersant daily that the deal was "almost done" with just some "subtleties" to solve.

The United States "may be indignant but Turkey is an independent state and can decide itself", he said.

However Igor Delanoe, Deputy Director of the French-Russian Analytical Centre in Moscow, said he was "very sceptical" that the deal would come to fruition.

Russia was uncomfortable with the transfer of technology and production localisation demanded by Turkey, he said. Moscow also had a demand backlog to its own forces but also to key client China.

"Both Moscow and Ankara use this story on the political level to show their respective dissatisfaction to the West," Delanoe said.

Russia's relations with Nato have been in crisis over its annexation of Crimea from Ukraine and for backing pro-Moscow separatists in eastern Ukraine.

But while still a key member of Nato, Turkey's ties with the United States in particular have been strained over Washington's support of the People's Protection Units (YPG) Syrian Kurd militia which Ankara considers a terror group.

"Ankara is also tempted to use (the S-400 issue) since it has been deeply frustrated by America's ongoing military cooperation with the Syrian Kurds," said Delanoe.

Timur Akhmetov, Ankara-based Turkey expert at the Russian International Affairs Council, said the talks helped Russia promote its arms systems and corrode trust among Nato members, while Turkey wanted to show its Western allies it has a strategic choice in its relationships.

"The longer the talks on the S-400 systems are on the agenda, the better for Russia and Turkey's respective interests," he said.

The fact the two countries are even discussing the purchase is a rich symbol of the transformation in relations since a reconciliation deal last summer following the shooting down by Turkey of a Russian plane over the Syrian border in November 2015.

Moscow and Ankara remain on opposed sides in the Syrian conflict with Russia backing the Damascus regime and Turkey the rebels.

In 2012, Turkish jets forced a Syrian plane flying from Moscow to Damascus to land at Ankara airport on the grounds it was carrying military equipment, reportedly radar parts for a Syrian air defence system.

The two post-imperial states both show an ability to compartmentalise relations by not letting a centuries old and persistent regional rivalry pollute potentially fruitful, but limited, areas of cooperation.

Yet analysts say talk of the S-400 deal is far short of an indication of a major strategic alliance.

"The only thing that makes both Turkey and Moscow drift to each other is their intention to pressure their own respective relations with the West," said Akhmetov.

Delanoe said "both partners do not trust each other" but "have built a geoeconomic partnership mainly based on energy" with work in progress on the TurkStream pipeline to pump Russian gas under the Black Sea.

According to a study by Can Kasapoglu of the EDAM centre for economic and foreign policy studies, Turkey's desire to obtain the weapons is also motivated by its dearth of qualified military pilots due to the purges that followed the July 15, 2016 failed coup which has necessitated an urgent shoring up of air defences.

Were Turkey to get its hands on the S-400 system, it would produce an outcome where Nato members Turkey and Greece were both operating Russian-made weapons, risking the same "vicious circle" that sees Moscow supplying bitter foes Armenia and Azerbaijan, he added.