Once the centre of the Ottoman Empire, the modern secular republic was established in the 1920s by nationalist leader Kemal Ataturk.

Straddling the continents of Europe and Asia, Turkey's strategically important location has given it major influence in the region - and control over the entrance to the Black Sea.

Turkey's progress towards democracy and a market economy was halting in the decades following the death of President Ataturk in 1938.

The army saw itself as the guarantor of the constitution, and ousted governments on a number of occasions when it thought they were challenging secular values.

Efforts to reduce state control over the economy also faced many obstacles. After years of mounting difficulties which brought the country close to economic collapse, a tough recovery programme was agreed with the IMF in 2002.

The austerity measures imposed then meant that by the time the global financial crisis came round in 2008, Turkey was in a better position to weather the storm than many other countries.

Image copyrightGetty ImagesImage caption
Turkey is a member of Nato and aspires to being part of the European Union

At a glance

Politics: Recep Tayyip Erdogan was voted in as president in 2014, having served as prime minister since 2003. He has dealt ruthlessly with alleged challenges from the secularist military and with expressions of civil dissent

Economy: The economy has enjoyed strong growth, fuelled by trade and foreign investment. Tourism, agriculture and manufacturing are key sectors

International: EU accession negotiations have been tortuous. Spotlight has been trained on Turkey as a result of European refugee crisis triggered by Syrian civil war

The level of public debt was already relatively low, and, although the effects of the recession were still felt, by 2010 the Turkish economy had started to bounce back and resumed growth.

Rise of Erdogan

Concerns over the potential for conflict between a secular establishment backed by the military and a traditional society deeply rooted in Islam resurfaced with the landslide election victory of the Islamist-based Justice and Development Party (AKP) in 2002.

Since 2008, hundreds of senior military officers and others received hefty jail sentences in connection with two alleged plots to overthrow the AKP government.

In 2015, all suspects in one of the two plot cases were acquitted after some evidence was found to be invalid.

Critics accused the government of staging show trials to neutralise the anti-Islamist influence of the armed forces in politics.

In 2013, concerns at creeping Islamisation and the growing authoritarianism of the prime minister since 2003, Recep Tayyip Erdogan, spilled over into mass protests in a number of cities. Later that year, the government was implicated in a major corruption scandal.

But the AKP's electoral support remained steady, and Mr Erdogan became the country's first directly-elected president in 2014.

Foreign relations

Joining the European Union has been a longstanding ambition.

Since becoming an EU candidate country in 1999, Turkey has introduced substantial human rights and economic reforms in an effort to bring itself into line with EU practices - including easing restrictions on the minority Kurdish language

Formal membership talks were launched in October 2005, but progress has been glacially slow.

Image copyrightGetty ImagesImage caption
The issue of Turkey's minority Kurds has troubled the country for decades

Turkey has long been at odds with close neighbour and EU member Greece over the divided island of Cyprus, although a breakthrough came when Turkey agreed to recognise Cyprus as an EU member, albeit without full diplomatic recognition.

The expedition of Turkey's EU accession talks was proposed in some quarters as a sweetener to persuade the Turkish government to agree to a plan to ease the European migrant crisis triggered mainly by the Syrian civil war that began in 2011.

However, many European countries continue to have serious misgivings over Turkish EU membership. Several European leaders insist that there can be no short-cuts for Turkey and that it must fulfil all the criteria set down for EU accession before it can proceed to the next stage.

A 2015 European Commission report on Turkey's progress towards fulfilling these criteria highlighted many areas of difficulty, particularly in the sphere of human rights.

Turkey has long seen itself as the eastern bulwark of the Nato alliance.

It also maintained close ties with Israel, but under Mr Erdogan it has more recently taken an openly confrontational approach to it over the Palestinian issue, partly in a bid to boost its regional standing among Arab countries.

After long following a policy of good relations with its neighbours, Turkey adopted a strongly pro-rebel stance when the Syrian civil war broke out, but stopped short of military assistance.

The Kurdish issue

Turkey is home to a sizeable Kurdish minority, which by some estimates constitutes up to a fifth of the population.

The Kurds have long complained that the Turkish government was trying to destroy their identity, and that they suffer from economic disadvantage and human rights violations.

In 1984, the militant Kurdistan Workers Party (PKK) launched a guerrilla campaign in 1984 for a homeland in the Kurdish heartland in the southeast.

Thousands died and hundreds of thousands became refugees in the ensuing conflict, and the 1999 capture of PKK leader Abdullah Ocalan prompted only a temporary lull.

Turkey, the US and the European Union deem the PKK a terrorist organisation.

In 2009, the government announced a "Kurdish initiative" that pledged to extend linguistic and cultural rights and to reduce the military presence in the mainly Kurdish southeast.

Following protracted negotiations with the government, Abdullah Ocalan announced the end of the armed struggle in 2013, leading many to assume that the insurgency was close to resolution.

However, after a relatively peaceful two years, spillover from the ongoing Syrian civil war - in which Kurdish fighters played an important role - caused old wounds to reopen, and in July 2015 the ceasefire between the Turkish government and the PKK finally crumbled, plunging swathes of south-eastern Turkey back into conflict.

The government reacted to a spate of deadly bombings in Turkey's biggest cities, Ankara and Istanbul, by launching another security crackdown. By early 2016, the peace process between Turkey and the PKK appeared to be in tatters.

Image copyrightGetty ImagesImage caption
East meets west in Turkey's largest city, Istanbul, which straddles Europe and Asia