The 18th Battalion was formed in New Zealand in September 1939. After a period of training, in 1940 it embarked for the Middle East as part of the 2nd New Zealand Division and then, in 1941, on to Greece. It participated in the Battle of Greece and later in the fighting on Crete. Evacuated from Crete, it then fought in the North African Campaign and suffered heavy losses during Operation Crusader. Brought back up to strength, in June 1942 the battalion participated in the breakout of the 2nd New Zealand Division from Minqar Qaim where it had been encircled by the German 21st Panzer Division. The following month, the battalion fought in the First Battle of El Alamein.