Erdogan said Turkey's "next target was joint production with Russia" of the next missile defence system.

President Recep Tayyip Erdogan on Monday hailed the controversial delivery of a Russian missile defence system despite the threat of US sanctions, as Turkey marked the third anniversary of a bloody coup attempt.

Just days before the anniversary, the first batch of the Russian S-400 defence system was delivered to Turkey despite repeated US calls for them to cancel the deal or face punishment.

"We have begun to receive our S-400s. Some said, 'they cannot buy them'... God willing the final part of this (delivery) will be in April 2020," Erdogan told a crowd of several thousand in Ankara.

The anniversary comes at a difficult moment for Erdogan. He faces a weakened economy, worsening relations with NATO ally the United States over the S-400 purchase, and a humiliating loss for his party in the recent Istanbul local election.

In 2016, nearly 250 people were killed -- excluding the coup-plotters -- and more than 2,000 injured after a rogue military faction tried to wrest power from the president. Thousands took to the streets in response to Erdogan's call to defeat the uprising.

Relations with the West deteriorated after the coup bid, as Turkish officials accused the West of not giving Ankara sufficient support.

Over the same period, Erdogan has grown ever closer to Russian President Vladimir Putin, raising concerns in Europe and the United States.

Erdogan said Turkey's "next target was joint production with Russia" of the next missile defence system.

"We are taking every measure to make sure our people do not suffer the betrayal of 15 July again or something similar," Erdogan added.

Late Monday he travelled to Istanbul to inaugurate a museum dedicated to the failed coup, where he insisted on the importance of commemorating the putsch attempt to prevent "greater evils".

Ankara accuses former ally-turned-foe Fethullah Gulen, a Muslim cleric exiled in the US, of having ordered the attempted coup. He lists his movement as a "terrorist" organisation.

Some 8,000 military personnel took part in the bid to overthrow Erdogan, backed by 35 fighter jets, three boats, 37 helicopters and 74 tanks, according to state news agency Anadolu.

Since 2016, tens of thousands of people have been detained while 150,000 public sector employees have been suspended or sacked over alleged links to Gulen.

Arrests continue

Erdogan's spokesman Ibrahim Kalin said on Twitter that Turkey "sends a powerful message of unity and solidarity to the world: We will die but never let traitors and putschists destroy our country, our freedom and our dignity."

The day, known as "15 July" in Turkey, has become a national holiday.

Earlier on Monday Erdogan took part in a tense ceremony at parliament, which was bombed during the coup violence.

Arzu, who was among the thousands who came to see Erdogan speak in Ankara, said she was there to "honour our martyrs", adding: "Without them, we would not be alive."

Anadolu reported Sunday that 110 suspected Gulen movement members have been extradited to Turkey from more than 20 countries.

Hundreds of life sentences have been handed down against accused putschists.

There are still almost daily police raids to capture suspects accused of ties to Gulen.

Based in Pennsylvania, Gulen strongly denies Ankara's claims. His movement rejects the "terrorist" tag, insisting it promotes education and moderate Islam.