World War II was a global conflict from 1939 to 1945. The European theatre (see World War II in Europe) included North and East Africa.
By the 1930s, most of Africa was divided between the European powers, as colonies and protectorates. See British Empire, French Colonial Empire and Portuguese Empire for the largest players. Italy, Belgium and Spain were also involved, and earlier on Germany, the Netherlands, Denmark, Sweden and the United States had been.
The Italians came late to the "scramble for Africa" in which the European powers divided up the continent, but they did manage to grab Libya in 1911. Ethiopia, which had famously resisted colonial forces, became part of the Italian Empire in 1936. Fascist Italy had an ambition to restore the Roman Empire encircling the Mediterranean Sea.
With the fall of France in June 1940, the French colonies in Africa formally became part of Vichy France, the Axis puppet state. One consequence of this was a British attack on the French naval base at Mers-el-Kebir near Oran, sinking French ships to prevent them falling into German hands. The film Casablanca takes place in Vichy Africa in this period.
In mid-1940, Mussolini's Fascist Italy joined the war on the German side and there were soon a series of engagements between Italian forces based in their colony of Libya and Commonwealth forces based in Egypt. Toward the end of 1940 the Germans joined in, creating the Afrika Corps under General Erwin Rommel. Rommel was one of the best German generals of this war, in particular a fine tank tactician. He was sometimes called "the desert fox".
The Strait of Gibraltar and the Suez Canal were important for Allied shipping, sometimes called "the lifeline of the empire". One of the main Axis objectives in North Africa was to gain control of the Suez Canal, mainly to prevent the Allies from using it, but also to use it themselves for transportation between Europe and the Pacific theatre. This never happened and the Yanagi missions, where submarines made shipments between Germany and Japan, had to use the much longer Cape Route. The Germans also desired to capture the oil fields of the Middle East.
In North Africa the British fought alongside Commonwealth allies. The largest contingent were ANZACs (Australia and New Zealand Army Corps), some of whom were withdrawn after the British were drawn into the Pacific War. There were also many Canadians and some from other countries.
South Africa was a self-governing dominion of the British Empire since 1931, and supported Britain during the war, though the country also had a strong pro-German movement. See 20th-century South Africa. Their troops did much of the fighting in East Africa, first preventing Italian expansion south from Ethiopia into the British colony of Kenya and then, working with local patriots, ending Italian rule in Ethiopia.
In November 1942, the Allies launched Operation Torch, invading Morocco and Algeria with mainly American troops; the main targets were Casablanca, Oran and Algiers. This was far the largest amphibious assault in history up to that time, and some lessons learned here were applied in the invasion of Normandy later. From then on, Rommel's Afrika Corps was in deep trouble; Commonwealth forces were already advancing on the east, but now there were also Americans attacking on the west. On 13th May 1943 the last German troops in North Africa surrendered, ending the war on the continent. The Allies then used North Africa as a base for invasions of Sicily and then mainland Italy.
While the African independence movements already had some support in the 1930s, they were accelerated by the war and its outcome. Many African soldiers fought for Free France and Britain. The Allies' policy from the 1941 Atlantic charter to the foundation of the United Nations, was that colonies should be liberated over time. By 1965, 20 years after the war, most of Africa was independent.
- Tobruk, Libya: A natural harbour, which became a stronghold held in turn by the Italians, the British and the Germans, until finally recaptured by the British.
- El Alamein, Egypt: Two large battles were fought around this town, only 100 km (60-odd miles) from Alexandria, in 1942. The Allies stopped the German advance into Egypt here in June. Then in October they attacked the German forces near the town and, after almost three weeks of fierce fighting, drove them back. This battle is regarded as one of the turning points of the war, the beginning of the British advance westward.
- Casablanca, Morocco: Famous from the 1942 film Casablanca, as a sanctuary for well-off refugees from France, on their route to neutral Portugal and the United States.