In the 19th century, Egypt was part of the Ottoman Empire. In 1882, during a nationalist uprising, British imperialism sent a navy and army of occupation to secure its interests, including the Suez Canal, a strategically important route to part of its Empire.
A massive wave of strikes and demonstrations by Egyptian workers from 1919 onwards forced the British government to declare an 'independent' Egyptian state. But British imperialism maintained its garrison in the Suez Canal zone.
After 1945, workers and peasants throughout the colonial world intensified their anti-imperialist struggles to achieve national and social liberation. Egyptian society was undergoing radical changes. Economic instability, inflation, and unemployment led to the growth of new political groups, such as the Muslim Brotherhood. Broad hostility towards Britain and its presence grew.
In the war which followed the withdrawal of the British army from Palestine, Zionist forces defeated the Arab armies. The young Egyptian officers who served in the war were highly critical of the actions of the military high command and ruling class.
A clandestine movement of young nationalist officers, including the charismatic Gamal Abdul Nasser, returned from Palestine more than ever convinced of the urgent need for radical change in Egypt. The Free Officers, as they called themselves, formed an executive committee of which Nasser, now a colonel, was elected president. Cells were formed throughout the armed forces, which distributed literature denouncing the regime.
Under pressure from growing unrest, Egypt's King Farouk, called a general election in 1950 and made a governing alliance with the Wafd party, dominated by big landowners and financiers.
Riding the tiger of nationalism, the Egyptian prime minister, Mustafa Nahhas, declared a state of emergency. Workers and students took steps to cut off supplies and labour to British forces stationed in the Canal zone. Nahhas could not restrain the formation of volunteer 'liberation' groups to carry out guerrilla attacks on the 80,000 British personnel garrisoned at the huge, complex Suez base.
On 25 January 1952 a British force surrounded police headquarters at Ismailia and called upon its occupants to surrender. They resisted until 50 were dead and many more injured.
The next day - known as 'Black Saturday' - crowds burned British and other foreign properties in Cairo. King Farouk dismissed the prime minister and four governments came and went in so many weeks.
Egyptian society was in turmoil. Millions were landless and unemployed. Land occupations and strikes were taking place. But with a weak Communist Party, and in the absence of a strong independent working class force to lead the urban and rural poor to power, Nasser stepped into the political vacuum.
As the regime disintegrated, the Free Officers took the initiative and on the night of 22-23 July, instructed loyal army units to seize key points in the capital, facing only token resistance. The Egyptian Revolution was declared.
King Farouk abdicated and was sent into exile. The Free Officers established the Revolutionary Command Council (RCC) to run the country (later the ruling party became the Arab Socialist Union).
The RCC espoused radical policies, such as getting rid of foreign powers' influence, ending the rule of the landlords and monarchy and corruption of political life. But the Free Officers movement had no developed or coherent political programme; they represented middle class frustration at the complete failure of capitalist politicians to develop society. In contrast to the weak landlord-capitalist class, the military was powerful and organised.
Under the monarchy, less than 0.5% of landowners between them owned over one third of all cultivable land. Land reform was carried out by the RCC but it was limited, with about 10% of the landless fellahin (peasants) benefiting from land redistribution. While this reform did weaken the power of the reactionary large landowners, Egypt remained semi-feudal.
In July 1954 an agreement over Suez was made with Britain. This entailed the former colonial power evacuating all its troops and maintaining the base, with civilians, on a seven year lease.
This proved to be a short term truce. As Nasser's anti-colonial liberation rhetoric gained a powerful echo in restive colonies in Africa, British Prime Minister Anthony Eden decided he had to be removed. Similarly France, in an ultimately futile battle with the independence struggle in Algeria, entered an alliance with Israel (which regarded Nasser as its chief regional foe) to counter Egypt.
US imperialism also looked on with alarm. Along with President Tito of Yugoslavia and India's Pandit Nehru, Nasser was regarded as one of founding fathers of a bloc of 'non-aligned states'.
But the Arab masses greeted Nasser's anti-imperialist nationalism with enthusiasm. At last, here was an Arab leader prepared to stand up to the old colonial masters and imperialism!
In 1956 America withdrew support for the gigantic Aswan Dam scheme in Egypt. As a reprisal Nasser, having secured Soviet aid for the building of the dam, announced the nationalisation of the Suez Canal on 26 July 1956, the fourth anniversary of the Egyptian Revolution. It electrified the whole neo-colonial world.
While Britain publicly tried to negotiate some continuing 'international' control of the canal, it secretly plotted with France and Israel to retake the canal by force and to remove Nasser. For Britain and France, if they were not to dwindle to second-rate powers, this seemed the last chance to act.
Intensifying pressure on Britain, Nasser called for international solidarity on 16 August, which resulted in massive strikes in Libya, Egypt, Syria, Jordan and Lebanon and other protests in Sudan, Iraq, Tunisia and Morocco.
Britain and France decided to act while the US was in the midst of presidential elections. American imperialism was locked into an intense rivalry with Britain and France for influence in the Middle East and had signalled it was against using military force.
At the same time, Stalinist Russia was preoccupied with the workers' revolt in Hungary.
Using the pretext of cross-border Palestinian raids and the blocking of the port of Eilat by the Egyptians, Israel invaded the Sinai on 29 October.
On the following day France and Britain issued an ultimatum, as part of the secret plan, demanding both parties withdraw their forces. Despite suffering large troop casualties, Nasser ignored the ultimatum.
On 31 October, French and British bomber planes started destroying most of the Egyptian air force. An Anglo-French force, assembled in Cyprus, landed near Port Said and after capturing the city (where 1,000 Egyptians, overwhelmingly civilians, were killed) made its way southwards along the canal.
Although winning militarily, the Anglo-French-Israeli attack provoked widespread anger on the Arab streets and from workers around the world. In Britain the labour movement staged a huge demonstration and rally in Trafalgar Square against the war.
The Soviet Union threatened retaliation and even the British Commonwealth faced collapsing over Suez. Most Arab states broke off diplomatic ties with Britain and France. Saudi Arabia blocked oil exports to Britain.
Crucially US Republican President Eisenhower refused to back the military action. The US blocked Britain's application to the International Monetary Fund for a loan.
Britain was forced to call a halt to its Suez action. On 6 November Britain and France accepted a UN-supervised ceasefire, ingloriously withdrawing their forces from Egypt. Israel could not continue alone.
British and French imperialism badly miscalculated. They hoped the war would provoke a popular uprising against Nasser. Instead his popularity was greatly enhanced in Egypt and throughout the Arab countries.
After the US forced Israel to withdraw from the Sinai and Gaza in early 1957, Egypt was left in full control of the canal. All British and French property in Egypt was sequestered and thousands of their citizens expelled. Two months later, the rest of Egypt's banking and insurance was nationalised.
For Britain and France, the Suez debacle represented the ending of their century-long domination of the Arab countries. British imperialism's economic and political weakness was starkly exposed. Eden was forced to resign.
For Nasser the years 1956 to 1959 marked the high tide of his rule, when his pan-Arab nationalism and anti-imperialism was immensely popular among Arab workers and the poor. He embarked on more 'Arab socialism' policies. Most industry, manufacturing and trade were nationalised. State control of foreign trade and progressive taxation was introduced.
However the regime did not overthrow capitalism. With his popular support, Nasser, a bonapartist dictator, manoeuvred between the capitalist and Stalinist powers of West and East.
From 1952-67 real wages rose 44%, not counting food subsidies. School and higher education was made free.
Nasser's rule was autocratic. The Communist Party was suppressed, strike leaders executed and unions turned into arms of the state.
Only the socialist transformation of society in Egypt and across the region, with a democratically planned economy, could have led to a permanent transformation of living standards, ended imperialist interference and ensured lasting peace between Israelis and Arabs.
Over the next decades, Arab nationalist and 'Nasserist' regimes degenerated into despotism, corruption and cronyism. After Nasser's death in 1970, Anwar el-Sadat took power and changed the name of the ruling Arab Socialist Union party to the National Democratic Party and promoted free market capitalism.
Subsequent falling living standards, mass unemployment and decades of suffocating dictatorship saw his successor, Hosni Mubarak, overthrown by a revolutionary movement in 2011. But the lack of a mass socialist alternative allowed the military to bloodily retake power. Fearful of the 'Arab Spring', imperialism intervened to prop up reactionary regimes in the region; sowing 'divide and rule' policies that helped spawn the horrors of Isis.
The memory of Suez and Nasserism lingers on. For socialists the main lesson of that period is that only mass struggle for a democratic federation of socialist states of the Middle East can meet the needs and full liberation of working people and the poor.