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 put Egypt at the crossroads once again, as they led to an Islamist Muslim Brotherhood breakthrough at subsequently annulled parliamentary polls and a narrow win for the Brotherhood candidate in the presidential election of 2012.
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.
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.Repressive rule
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 more recently 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 since 1967 - apart from an 18-month interruption in 1981 - muzzled political dissent, and the security forces became renowned for their brutality. Corruption was widespread.
At a glance
- 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 has been a key ally of the West; it has played a major role in the Israeli-Arab conflict
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, which eventually led President Mubarak to step aside. He was arrested and sentenced to life imprisonment over deaths during the demonstrations.
The road towards democracy proved rocky, however, and post-revolutionary politics became polarised between the newly ascendant Islamists on the one hand and liberal and secular forces on the other.
After the interim military administration's promised rapid transition ended up lasting more than a year, parliamentary elections finally held in December 2011 and January 2012 produced large majorities for Islamist parties, and a presidential poll in May-June 2012 was by won by Islamist Muslim Brotherhood candidate Mohammed Morsi.
Over the next year, however, the new government antagonised a growing number of institutions and social groups - in particular secularists, liberals and Coptic Christians - while continued economic hardship alienated many ordinary Egyptians.
On the first anniversary of Mr Morsi's rule, these pressures erupted in mass demonstrations. The military quickly sided with the anti-Morsi protesters, suspending the constitution, ousting the Islamist president, and violently dispersing mass protest sit-ins held by the Brotherhood in response to what it angrily denounced as a coup.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.