After the last native pharaoh's rule ended in the fourth century BC, Egypt was ruled for over two millenia by foreign powers - Greek, Persian, Roman, Ottoman, and British, among others.
Like many other modern Arab states, Egypt became an independent kingdom in the wake of World War I. For thirty years King Fuad, then his son Farouk, ruled the country.
In 1952, disaffected army officers overthrew King Farouk, turning Egypt into a republic for the first time in its history. Gamal Abdel Nasser, a charismatic colonel, emerged as the country's president in 1956. Nasser was a fiery proponent of pan-Arabism. The pan-Arab spirit hit its high-water mark in the late 1950s, when Syria and Egypt merged in an ill-fated union called the United Arab Republic. The UAR dissolved in 1961.
Quick facts on Egypt
Population: 82,079,636 (2011)
Capital: Cairo, population 10,902,000 (2011)
Religion: Muslim, 90 per cent (mostly Sunni); Coptic Christian, 9 per cent
Language: Arabic (official), English and French are also widely understood
Geography: Located in the northeastern corner of Africa, Egypt borders the Mediterranean Sea to the north, Israel and the Red Sea to the east, Sudan to the South, and Libya to the west.
Literacy rate: 71.4 per cent (2005 estimate)
Source: CIA World Factbook
After suffering a disastrous defeat at the hands of Israel in 1967, Egypt launched a surprise attack on Israel with Syria in 1973. Although the war ended in a stalemate, it was a psychological victory for Egypt.
Following Nasser's death in 1970, Anwar Sadat took over as president. When Sadat was assassinated in 1981, Hosni Mubarak, who was vice president of Egypt at the time, was elevated to president.
In January 2011, Egyptian protestors - inspired by events in Tunisia - began demonstrations against Mubarak and his government, which was widely perceived to be corrupt and ineffectual. After just 18 days of protests, Mubarak announced his resignation, and fled Cairo for his presidential palace at Sharm al-Sheikh, on the shores of the Red Sea.
Since Mubarak's downfall, Egypt has been ruled by the Supreme Council of the Armed Forces (SCAF), a group of 20 high-ranking military officers. Beginning in November, Egypt will hold parliamentary elections.
Given its large population, cultural cachet, and strategic location astride two continents, Egypt has been one of the most powerful countries in the Middle East since gaining independence.
Egypt fought four wars with Israel since 1948. Then in 1979, Egyptian President Anwar Sadat signed a historic peace treaty under which Egypt agreed to recognise Israel's existence in exchange for the return to Egypt of the Sinai Peninsula, which Israel had occupied since 1967. The peace treaty was deeply unpopular among many Egyptians at the time, and remains so today.
Since Mubarak's resignation in February, Egypt's government, in line with popular sentiment, has taken a somewhat harder stance on Israel. In September 2011, Egyptian protesters attacked the Israeli embassy in Cairo, and the Egyptian military had to rescue six Israelis trapped inside.
Egypt maintained close ties with Muammar Gaddafi's Libya, even kidnapping Libyan dissidents and sending them to Libya.
For many years the US supported Mubarak's government. Mubarak co-operated with the "war on terror" launched by George W Bush and Egypt is considered by the US to be a moderate Arab country. This support alienated many pro-democracy Egyptians who protested against Mubarak's rule.
Under Nasser, Egypt's economy was highly controlled by the state. However, since the 1990s, Egypt has liberalised many sectors of its economy.
Unemployment rates for young people in Egypt were high during the 2000s, which was a major source of discontent fuelling the Egyptian uprising of 2011. Food prices have also been persistently high during the past several years.
Egypt does export oil and natural gas, but its reserves are much smaller than those of neighbouring Libya. Egypt's economy is highly dependent on tourism; however, the uprising has led to a major slump in the industry.
The Suez Canal, which connects the Mediterranean Sea with the Indian Ocean, is a major shipping route, and provides an important source of revenue for the Egyptian government.