When Benito Mussolini declared war on the Allies on 10th June 1940, he already had over a million men in the Italian Army based in Libya. In neighbouring Egypt the British Army had only 36,000 men guarding the Suez Canal and the Arabian oilfields.
On 13th September, 1940, Marshall Rodolfo Graziani and five Italian divisions began a rapid advance into Egypt but halted in front of the main British defences at Mersa Matruh. Although outnumbered, General Archibald Wavell ordered a British counter-offensive on 9th December, 1940. The Italians suffered heavy casualties and were pushed back more than 800km (500 miles). British troops moved along the coast and on 22nd January, 1941, they captured the port of Tobruk in Libya from the Italians.
Adolf Hitler was shocked by the defeats being suffered by the Italian Army and in January 1941, sent General Erwin Rommel and the recently formed Deutsches Afrika Korps to North Africa. Rommel mounted his first attack on 24th March 1941, and after a week of fighting he pushed Archibald Wavell and the British Army out of most of Libya.
On 18th November, 1941, Auchinleck and the recently formed Eighth Army went on the offensive. Erwin Rommel was forced to abandon his siege of Tobruk on 4th December, and the following month had moved as far west as Archibald Wavell had achieved a year previously. Aware that Wavell's supply lines were now overextended, and after Rommel gained obtained reinforcements from Tripoli he launched a counterattack. It was now the turn of the British Army to retreat.
British forces under General Leslie Morshead repulsed German attacks on the fortress and on 4th December, 1941, Rommel decided to abandon the siege of Tobruk.
After his victory at Gazala Rommel returned to Tobruk and took the port on 21st June, 1942. This included the capture of military equipment and 35,000 British troops.
On 1st November 1942, General Bernard Montgomery launched an attack on the Deutsches Afrika Korps at Kidney Ridge. After initially resisting the attack, Rommel decided he no longer had the resources to hold his line and on the 3rd November he ordered his troops to withdraw. However, Adolf Hitler overruled his commander and the Germans were forced to stand and fight.
The next day Montgomery ordered his men forward. The Eighth Army broke through the German lines and Erwin Rommel, in danger of being surrounded, was eventually given permission by Hitler to retreat. Those soldiers on foot, including large numbers of Italian soldiers, were unable to move fast enough and were taken prisoner.
For a while it looked like the the British would cut off Rommel's army but a sudden rain storm on 6th November turned the desert into a quagmire and the chasing army was slowed down. Rommel, now with only twenty tanks left, managed to get to Sollum on the Egypt-Libya border.
On 8th November Erwin Rommel learned of the Allied invasion of Morocco and Algeria that was under the command of General Dwight D. Eisenhower. His depleted army now faced a war on two front. The British Army recaptured Tobruk on 13th November, 1942, bringing the battle at El Alamein to an end.