ANKARA (Reuters) - Turkey and Russia on Friday signed an accord for Moscow to supply Ankara with S-400 surface-to-air missile batteries, Turkish authorities said, finalizing a deal set to deepen military ties between NATO member Turkey and the Kremlin.

Russian S-400 Triumph medium-range and long-range surface-to-air missile systems drive during the Victory Day parade at Red Square in Moscow, Russia, May 9, 2015. REUTERS/Sergei Karpukhin

The S-400 deal, reportedly worth some $2.5 billion and in the works for more than a year, has worried the West because the system cannot be integrated into NATO’s military architecture.

As part of NATO’s collective defense pledge, the allies integrate their ships, planes and weapons systems to make them work together, as well as sharing command across the alliance.

The accord is the latest in a series of moves by Ankara to boost its defense capabilities as it faces threats from Kurdish and Islamist militants at home and conflicts across its borders in Syria and Iraq.

In a statement late on Friday, Turkey’s Undersecretariat for Defence Industries (SSM) said that Moscow would supply the S-400 missile batteries to Ankara in an initial delivery planned for the first quarter of 2020.

On Wednesday, Sergei Chemezov, head of the Russian state conglomerate Rostec, told the Kommersant daily that Russia would supply Turkey with four batteries of S-400s under the deal.

However, the SSM said Turkey would buy two S-400 batteries from Russia under the agreement, with one being optional, and added the systems would be used and managed “independently” by Turkish personnel, rather than Russian advisors.

It said the Turkish Armed Forces (TSK) would have full control over the systems, and added that the accord signed earlier on Friday included clauses on cooperation for technologic gains and joint development.

Turkey’s purchase of the systems has unnerved NATO member countries, who are already wary of Moscow’s military presence in the Middle East, as the system is incompatible with the alliance’s systems.

NATO officials have warned Turkey about unspecified consequences of purchasing the S-400, but Turkish President Tayyip Erdogan has said ties with NATO remain strong.

Chezmezov said Moscow was expected to begin the first deliveries in March 2020 and that Turkey was the first NATO member state to acquire the advanced S-400 missile system.

Earlier on Friday, Turkish newspapers cited Erdogan as saying Turkey would borrow in the Russian currency in a loan deal under the accord.

BORROWING “IN RUBLES”

“We will not borrow in dollars in this loan, we will borrow in rubles,” Hurriyet newspaper quoted Erdogan as telling reporters on his plane, returning from a trip to Africa.

According to Chemezov, Turkey would pay 45 percent of the cost of the agreement up front, with Russia providing loans to cover the remaining 55 percent.

The Russian Finance Ministry will finance a deal from the state treasury, while Russian banks will take part solely in the transfer of funds in the deal, a Russian banking source said.

Relations between Moscow and Ankara deteriorated sharply in 2015 after Turkey shot down a Russian air force jet that it said had crossed into Turkish airspace, but they have since repaired ties despite having backed different sides in the Syrian war.

They are now cooperating on Syrian peace efforts as well as projects in the defense industry and energy sectors.

While pushing ahead with the S-400 project, Ankara has sought to secure defense deals with other countries as well.

In November, Turkey signed a letter of intent with France and Italy to strengthen cooperation on joint defense projects. As a first step, the Franco-Italian EUROSAM consortium and Turkish companies will look into a system based on the SAMP-T missile systems.

Turkey has also invested heavily in the development of its domestic defense industry, with projects encompassing areas including combat helicopters, tanks, drones and warships.