Egypt is the largest country in the Arab world. Cairo, with over 18 million people, is one of the world's biggest cities, a centre of great riches and ballooning poverty.
About one and a half million people in Cairo are estimated to have other people's roofs as their homes. About one million use the old Mameluke graveyard as home, making dwellings out of the tombs. Other graveyards, particularly abandoned Jewish cemeteries, are considered as "better" shantytowns, compared to the outlying ones, because they are more central and they provide materials for comparatively solid dwellings.
Egypt was one of the earliest centres of human civilisation. For centuries it languished under the Ottoman Empire, centred in Turkey. Between 1805 and 1848, a local governor, Mehmet Ali, made a drive to win autonomy for Egypt and modernise it on European lines. He failed.
European capital rushed in, particularly with the building of the Suez Canal (1859-69). The khedive (king, under the overlordship of the Ottoman Sultan) ran up huge debts and did not have a tax-gathering machine sufficient to pay them. Britain invaded on behalf of the bondholders in 1882. It was meant to be a temporary operation, but led to Britain becoming overlord of Egypt for 70 years, until 1952.
In 1952, a nationalist coup by army officers ousted the king. Gamal Abdul Nasser emerged as leader of the new regime. In 1956 he nationalised the Suez Canal, and faced down an invasion by Britain, France, and Israel.
The USA, anxious for influence in the Middle East and convinced the old ways of European colonialism would not work, had applied decisive pressure to make Britain, France, and Israel retreat. But after 1956 Nasser swung towards the USSR in the Cold War polarity of world politics of that era.
He carried out big land reforms, which seriously improved peasants' living standards for a while, and nationalised almost all of industry. Old owners of Egyptian origin generally continued to run their businesses as managers under government ownership, but the large section of Egypt's bourgeoisie which was of Greek, Jewish, or Armenian extraction were dispossessed. Greek, Jewish, and Armenian families, including poor ones, were driven out of Egypt, and especially out of the once fabulously cosmopolitan city of Alexandria.
Nasser became the hero and leader of "Arab socialism". Briefly (1958-61) Syria joined his rule as part of a "United Arab Republic".
In the early days Nasser had been relatively open to negotiation with Israel, but nothing had come of that. Now, as Arab nationalist discourse burgeoned, it came to define Israel as "the enemy". Colonial rule had gone; there was now no further "national independence" measure that could mend the Arab states' adverse position in world-market capitalism; Israel was targeted, essentially, as a scapegoat for the inability of bourgeois Arab nationalism to unify the Arab world and make social improvements.
Tension culminated in war, in 1967 - and a startlingly quick and complete defeat for Egypt and the other Arab states. Nasser was crestfallen. He died in 1970. His successor, Anwar Sadat, opened the economy up to Western investment and market forces ("infitah"), and, under US pressure, in 1979 made a peace deal with Israel, becoming the first major Arab country after Jordan to recognise the Jewish state.
The peace deal was popular at first, but soured over time.
Sadat was assassinated by an Islamist in 1981, and Mubarak has ruled since then. The regime, like most of those in the Arab world dating from the heyday of Arab nationalism, has become more and more sclerotic, corrupt, and discredited. Egypt is the world's biggest recipient of US military aid, after Israel.