Turkey's army launched a coup attempt on Friday in a country that has seen three full military coups since 1960.
Here are some key facts on the strategically important Muslim-majority nation which is battling threats on two main fronts, against Islamic State group jihadists and Kurdish militants.
Between Europe and Asia
Turkey shares borders with Syria, Iran and Iraq but also EU members Greece and Bulgaria. With a Black Sea coastline facing Russia, it has been a Nato frontline state for more than 60 years.
Covering about 784,000 square kilometres (300,000 square miles), Turkey is slightly smaller than Pakistan but larger than the US state of Texas.
It has played a key role in Europe's migrant crisis, having taken in more than two million Syrian refugees, compared with its own population of around 78 million.
A Nato member since 1952, it is strategically placed to take part in the US-led fight against Islamic State jihadists, but waited for almost a year to join air strikes on Syria and to open its air bases to US planes.
It has criticised Russia's intervention in Syria, which has provoked several airspace incidents along its border.
The capital Ankara has a population of around five million. Istanbul is the largest city and industrial and commercial hub with more than 15 million people.
Troubled political life
The Republic of Turkey was created as a secular state in 1923 after the collapse of the Ottoman empire at the end of World War I.
Its founder Mustafa Kemal Ataturk was president until his death in 1938. His successor Ismet Inonu introduced multi-party democracy in 1946. Turkey witnessed repressive military coups in 1960, 1971 and 1980.
In 1997 the Turkish military also forced out current President Recep Tayyip Erdogan's late mentor Necmettin Erbakan from the premiership.
The Islamic-rooted Justice and Development Party (AKP) came to power in November 2002. Its leader Erdogan was prime minister from 2003 until 2014, when he became the first Turkish president directly elected by the people.
Since July 2015, Turkey has suffered heavy violence with the resumption of the Kurdish conflict against the background of the war in Syria and a series of bloody attacks
A de facto ceasefire with the PKK was broken in July 2015 when the government launched an unprecedented two-pronged "anti-terror" operation against jihadists in Syria and Kurdish militants in southeast Turkey and northern Iraq.
Since 1984, the outlawed Kurdistan Workers' Party (PKK) has led an armed rebellion in the Kurdish-majority southeast that has claimed more than 45,000 lives.
Western concerns have also mounted about the state of democracy and freedom of speech in Turkey after several raids on media groups and a string of prosecutions of journalists.
Since mid-2015 Turkey has seen a string of attacks with mass fatalities.
In October of that year, in the bloodiest attack in Turkey's history, 103 people were killed and more than 500 wounded in twin suicide bombings targeting a pro-Kurdish peace rally in Ankara. The prime minister said IS was the main suspect.
In 2016, seven major attacks claimed more than 120 lives including the latest on 28 June.
In that attack, 45 people were killed, including foreigners, and over 200 injured in a triple suicide bombing and gun attack at Istanbul's Ataturk airport. There was no claim of responsibility but authorities said evidence points to the Islamic State group.
Turkey has taken in 2.7 million Syrians from the brutal war that broke out across its border in 2011, making it host to the largest refugee population in the world.
Many Syrian refugees have launched attempts to reach Europe from Turkey's shores, making the perilous journey by sea to Greece.
Under a controversial deal between the European Union and Turkey that came into force in March, failed asylum seekers face being sent back from the Greek islands to Turkey.