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 European colonies and protectorates. See British Empire, French Empire and Portuguese Empire for the largest players. Belgium and Spain were also involved, and earlier on Germany and Holland 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 Casablana 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, sometimes called "the desert fox" and a fine tank tactician.
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 November 1942, the Allies launched Operation Torch, invading Morocco and Algeria. On 13th May 1943 the last German troops in North Africa surrendered, and the North African war was over.
The Union of South Africa was a self-governing dominion of the British Empire since 1931, and supported Britain during the war. The country still had a strong pro-German movement. See 20th-century South Africa.
While the African independence movement already had some support in the 1930s, it was 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.
- 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.