When Italy declared war on June 10, 1940 against Britain and France, The British position in North Africa seemed hopelessly outmatched. UK Army General Percival Wavell commanded 40,000 Dominion soldiers caught between 200,000 Italian troops in Libya and 250,000 to the south in Ethiopia and Somaliland.
The Italians under Marshal d'Armata Rodolfo Graziani invaded and occupied British Somaliland on August 17, 1940, potentially cutting off American merchant transit through the Red Sea and cutting of the British from India. On September 13, Graziani reluctantly invaded Egypt under pressure from Mussolini.
Wavell sent 30,000 troops on December 9 under UK Army General Richard O'Connor to reclaim Sidi Barrani, Egypt, 65 miles inside Egypt's border with Libya. The Italians had heavily fortified the town, but the British caught them by surprise and took 20,000 prisoners. The enterprising O'Connor then turned the large-scale raid into a full-scale invasion of Libya, taking more prisoners and occupying Tobruk , Benghazi, and the whole of the Libyan province of Cyrenaica. 130,000 Italian prisoners march towards Egypt.
Then, a major shift in the balance of power occurred. Wavell was ordered to cut back his forces and send them to Greece. Hitler sent the Afrika Korps to help the Italians, led by the effective Generalleutnant Erwin Rommel. Rommel arrived on February 12, 1941. Technically under Italian command, Rommel led an armored attack that smashed through the smaller British force, capturing O'Connor and almost all of the British conquests except for the embattled port of Tobruk. The British settled in for a long siege.
Churchill overruled his advisors and sent precious military supplies and weapons to Wavell, who tried twice to beat his way through Rommel to Tobruk. Rommel developed new doctrines of desert warfare, using antiaircraft guns against tanks and employing Blitzkrieg tactics to outflank the British. Wavell had to resign in the face of these defeats.
General Sir Claude Auchinleck arrived in November 1941. The UK Desert Force became the UK Eighth Army. In Operation Crusader, he lifted the 242-day siege of Tobruk, drove Rommel back against El Agheila, and destroyed a quarter of the Afrika Korps and almost half of the Italian Army in Libya.
But the British were hard pressed to supply both Auchinleck and the island of Malta. Rommel consolidated his forces, resupplied, and burst forth from El Agheila, taking Benghazi and driving on Tobruk. The British fell back on the Gazala Line, a series of forts linked by minefields.
Both sides paused to regroup and strengthen their forces. On May 26, 1942, Rommel renewed the attack, but was blocked by strong resistance and caught between two strongpoints on the Gazala Line. Living up to his nickname of the Desert Fox, Rommel wheeled on the British, smashed the defenders of Bir Hacheim, and took Tobruk on June 17. Rommel captured 30,000 defenders and captured the supply dump there.
Hitler promoted Rommel to Feldmarschall. "It would be better if he sent me another division," Rommel remarked when he was told of his new rank. The British fell back on their first line of defense in Egypt, Mersa Matruh, and Rommel followed. The line fell at the end of June 1942.
Rommel was beginning to stretch his supply lines, despite capturing huge stores of British supplies along the way. He could not break the El Alamein line, the last defense before Alexandria. Churchill sacked Auchinleck and replaced him with General William Gott, who was killed in a plane crash while taking command.
Churchill, shaken by the fall of Tobruk, searched for a man to replace Gott who could save Alexandria and the whole of Egypt from surrender. He chose UK Lieutenant General Bernard Law Montgomery, who spent a lot of time reorganizing and retraining the Eighth Army. On August 31, 1942, Rommel struck the El Alamein line, and was repulsed by heavy artillery fire.