Operation Compass (also Italian: Battaglia della Marmarica) was the first large British military operation of the Western Desert Campaign (1940–1943) during the Second World War. British metropolitan, Imperial and Commonwealth forces attacked the Italian and Libyan forces of the 10th Army (Marshal Rodolfo Graziani) in western Egypt and Cyrenaica, the eastern province of Libya, from December 1940 to February 1941.
The Western Desert Force (WDF) (Lieutenant-General Richard O'Connor) with about 36,000 men, advanced from Mersa Matruh in Egypt on a five-day raid against the Italian positions of the 10th Army, which had about 150,000 troops in fortified posts around Sidi Barrani in Egypt and in Cyrenaica to the west. The WDF swiftly defeated the Italians in their fortified posts and at Sidi Barrani, forced the rest of the 10th Army out of Egypt and captured the ports along the Cyrenaican coast in Libya. The 10th Army was cut off as it retreated towards Tripolitania at the Battle of Beda Fomm, the remnants being pursued to El Agheila on the Gulf of Sirte.