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.
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.
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.
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 put on trial in August 2011 over deaths during the demonstrations.
An interim military administration took charge, promising to effect a quick transition to democracy. Under continuing pressure from pro-democracy protesters, a new interim government was formed. In March 2011, a series of constitutional changes paving the way for early elections were approved.
But a key demand of the revolutionaries - the lifting of Egypt's emergency law - has not been fulfilled. The law was partially lifted after the January 2012 parliamentary elections, but only after having its provisions broadened.
There are also fears that the strong Islamist showing in these elections could threaten democratic gains, the status of Coptic Christians and women, and the crucial tourism industry.
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.
At a glance
Politics: President Hosni Mubarak stepped down in February 2011 amid an uprising, handing power to the military.
A transition to civilian rule is in progress
Economy: The Egyptian economy is the second largest in the Arab world after Saudi Arabia
International: Egypt has been a key ally of the West; it has played a key role in the Israeli-Arab conflict
Country profiles compiled by BBC Monitoring