The Western Desert campaign took place in the deserts of Egypt and Libya and was the main theatre in the North African campaign of the Second World War. Military operations began in June 1940 with the Italian declaration of war and the Italian invasion of Egypt from Libya in September. Operation Compass, a five-day British raid in December 1940, led to the destruction of the Italian 10th Army. Benito Mussolini sought help from Adolf Hitler, who sent a small German force to Tripoli under Directive 22. The Afrika Korps was formally under Italian command, as Italy was the main Axis power in the Mediterranean and North Africa.
In the spring of 1941, Rommel led Operation Sonnenblume, which pushed the Allies back to Egypt except for the siege of Tobruk at the port. At the end of 1941, Axis forces were defeated in Operation Crusader and retired again to El Agheila. In early 1942 Axis forces drove the Allies back again, then captured Tobruk after the Battle of Gazala but failed to destroy their opponents.