Long known for its pyramids and ancient civilisation, Egypt is the largest Arab country and has played a central role in Middle Eastern politics in modern times.
In the 1950s President Gamal Abdul Nasser pioneered Arab nationalism and the non-aligned movement, while his successor Anwar Sadat made peace with Israel and turned back to the West.
The protests that ousted President Hosni Mubarak in 2011 raised the hopes of those seeking democratic reform and an end to decades of repressive rule.
But it was the Islamists who initially benefited, before they were themselves swept away by the military and secularist protesters, prompting speculation about a return to authoritarianism.
Egypt's ancient past and the fact that it was one of the first Middle Eastern countries to open up to the West following Napoleon's invasion have given it a claim to be the intellectual and cultural leader in the region. The head of Cairo's Al-Azhar Mosque is one of the highest authorities in Sunni Islam.
Protest in Tahrir Square, Cairo, in early 2012
A popular uprising in early 2011 forced President Mubarak from power, ushering in a long period of instability.
But the historic step by President Anwar Sadat to make peace with Israel in the 1979 Camp David agreement led to Egypt being expelled from the Arab League until 1989, and in 1981 Mr Sadat was assassinated by Islamic extremists angry at his moves to clamp down on their activities.
President Hosni Mubarak took a more conciliatory approach, but Islamic groups continued their campaigns sporadically. They have been responsible for deadly attacks that often targeted tourists and resort areas, and began to harass Egypt's Coptic Christian community.
While providing stability and a measure of economic progress, Mr Mubarak's rule was repressive. An emergency law in force nearly continuously since 1967 muzzled political dissent, and the security forces became renowned for brutality. Corruption was widespread.
Continue reading the main story
At a glance
Sphinx, Giza, Egypt
Politics: President Hosni Mubarak stepped down in February 2011 amid an uprising, handing power to the military. The Islamist Muslim Brotherhood won elections but was ousted by the army a year later amid mass protests
Economy: The Egyptian economy is the second largest in the Arab world after Saudi Arabia, but struggles to support the growing population
International: Egypt, a leading ally of the West since the mid-1970s, has played a major role in the Israeli-Arab conflict. In 2014 it began to assert itself against Islamist extremists at home and abroad
Country profiles compiled by BBC Monitoring
Encouraged by the protests that overthrew the long-term leader of Tunisia, mounting popular anger burst to the surface in huge anti-government demonstrations in January 2011 that eventually ended President Mubarak's long rule.
The protesters' hoped-for transition democracy proved elusive, however, as post-revolutionary politics became polarised between the newly ascendant Islamists on the one hand and the military as well as liberal and secular forces on the other. A growing Islamist militant insurgency has also shaken Egypt's stability.
Following a year of interim military rule, the first presidential elections in half a century were won by Islamist Muslim Brotherhood candidate Mohammed Morsi in 2012.
But a year on, growing dismay at the government's actions among many Egyptians - primarily secularists, liberals and Coptic Christians - boiled over in another wave of protests. Siding with the demonstrators, the military ousted Mr Morsi and violently suppressed the protest sit-ins held by the Brotherhood in response.
The new authorities outlawed the Brotherhood, started drafting a new constitution and curbed media freedom. The army chief, Abdul Fattah al-Sisi, won the presidency in May 2014 elections. His rise has left some fearing an effective return to military rule, while others are more apprehensive of a campaign of violence by the jihadist Ansar Beit al-Maqdis in Sinai.
Geography and economy
Egypt's teeming cities - and almost all agricultural activity - are concentrated along the banks of the Nile, and on the river's delta. Deserts occupy most of the country.
The economy depends heavily on agriculture, tourism and cash remittances from Egyptians working abroad, mainly in Saudi Arabia and the Gulf countries.
However, rapid population growth and the limited amount of arable land are straining the country's resources and economy, and continuing political turmoil has paralysed government efforts to address the problems.
Most of Egypt's population is concentrated along the River Nile