The Battle of El Agheila was a minor engagement in North Africa during the Second World War. It took place in December 1942 between Allied forces (the British 8th Army) led by Bernard Law Montgomery and the Axis forces (German-Italian Panzer Army) led by Erwin Rommel, during the Axis' long withdrawal from El Alamein to Tunis. It ended with a full Axis retreat into Tunisia.
On 4 November 1942, Rommel decided to finally end the desperate fighting at El Alamein and withdrew west toward Libya. In doing so, he defied the "Stand to the last" orders of Adolf Hitler, in order to save the remainder of his force. Rommel's forces reached the village of Fuka the next day. Italian forces had arrived earlier (they withdrew from El Alamein on 3–4 November) and they had formed a defensive line. However, the Italians resumed their withdrawal on the same day and. after a successful Allied attack, the Germans followed them. Montgomery rested some of his formations after their efforts at El Alamein and pursued mainly with the 7th Armoured Division and 4th Light Armoured Brigade.
Rain on the afternoon of 6 November impeded the British pursuit as the Axis forces continued their withdrawal  and a new defence line was established at Marsa Matruh (also known as Mersa Matruh) the following day, some 110 mi (180 km) west of El Alamein. Rommel received a warning from Hitler of an expected Allied landing between Tobruk, and Benghazi, but on 8 November he discovered that this was wrong. Instead, there were Anglo-American landings in Morocco and Algeria (Operation Torch). The Eastern Task Force—aimed at Algiers—landed with 20,000 troops and began moving east towards Rommel. Facing the prospect of a large Allied force to his rear, he decided to withdraw in one bound to El Agheila.
Axis forces evacuated Sidi Barrani on 9 November and Halfaya Pass (on the Libyan-Egyptian border) on 11 November, thereby abandoning Egypt. The whole of Cyrenaica was evacuated without serious resistance. Nonetheless, Rommel wanted to retain Tobruk for as long as possible, to save 10,000 short tons (9,100 t) of equipment, but it fell to the British on 13 November. An attempt by Montgomery to trap the Tobruk garrison by an enciclement toward Acroma—west of Tobruk—failed and the garrison evacuated toward Benghazi, almost intact. Meanwhile, Derna and its airfield Martuba, were captured on 15 November. Martuba's capture was particularly welcome to the British as they were thus able to provide air cover for an essential Malta convoy on 18 November. Axis forces had now withdrawn 400 mi (640 km) in 10 days.
Despite the importance of the Port of Benghazi to the Axis supply chain, Rommel had to evacuate the town in order to avoid the possibility of a repeat of the disastrous entrapment suffered by the Italians at the Battle of Beda Fomm in February 1941. Regretfully, Rommel ordered the destruction of the port facilities and materiel in Benghazi, writing afterward:
"...in Benghazi, we destroyed the port facilities and platforms and the chaos overwhelmed the civilians in this miserable town.."
During their withdrawal to Brega, the Axis forces faced many difficulties, including British air superiority which allowed them to target the Axis supply columns, the crowding of the Axis forces on the coastal road and a shortage of fuel. In order to delay the British advance at any cost, Axis sappers laid mines in the Brega area. To delay clearance, steel helmets were also laid to mislead British mine detectors.
No important actions took place during the eighteen days between the evacuation of Ajdabiya on 23 November and the beginning of the Battle of El Agheila on 11 December and, consequently, historians have paid little attention to this period. However, Rommel described in it detail in his memoirs. There were disagreements with his political and military superiors and he engaged in fruitless bitter arguments with Hitler, Göring, General Kesselring (German commander of the Mediterranean theatre), Ugo Cavallero (the Italian chief of staff), and Ettore Bastico (the Governor of Libya). Rommel's idea was to withdraw to Tunis as soon as possible, while the others wanted to make a stand at the Brega line.
Meanwhile, the British had their own difficulties. They had to supply their own forces over a long distance from Egypt to Ajdabiya. The terrain from Alexandria to Tobruk, a section of 440 mi (710 km), was relatively easy as there is a railway between them. By contrast, although the section from Tobruk to Agedabia is shorter (390 mi (630 km)), supplying the British forces was much more difficult in this section, as materiel had to be carried either by the Via Balbia road, or by sea (first to Benghazi, then to Ajdabiya).
For a substantial part of the pursuit to El Agheila, the British commanders were uncertain of Rommel's intentions. They had been caught out in earlier campaigns by an enemy that had drawn them on and then counter-attacked. Montgomery had intended to build his army's morale by banishing the habit of defeat and retreat and, to this end, two divisions[note 2] were held at Bardia, resting and providing a defence line in case of need. Despite Rommel's concerns of entrapment by a rapid Allied advance across the Cyrenaica bulge, Montgomery was aware that an extended and isolated force could also be vulnerable, as demonstrated in early 1941 and early 1942. When a reconnaissance force was sent across country, it became delayed by water-logged ground and a subsequent, stronger force was fought off.
The British assault on the Axis positions on Brega, and El Agheila began on the night of 11/12 December. The Axis forces engaged a British reconnaissance force at Merduma, (60 mi (97 km) west of El Agheila) behind the Axis lines, so Rommel decided to withdraw. By the evening of 12 December, the Axis withdrawal began, except for some units who were covering the extrication.
On 13 December, Axis reconnaissance aircraft discovered some 300 vehicles north of Marada oasis (75 mi (121 km) south of El Agheila), which meant for the Axis forces the danger of being outflanked, so the withdrawal continued. Meanwhile, in the north, a British attack was held back by the Italians.
On 15–16 December, isolated engagements occurred between the two combatants. On 17 December, the bulk of the German forces withdrew from El Agheila.
Rommel withdrew to Buerat, with the intention of withdrawing further to Tunis, but under pressure from his superiors he established a new defensive line at Buerat.