At this point General Harold Alexander took over as commander-in-Chief Middle East Command and Lieutenant-General Bernard Montgomery took over the Eighth Army under him. After victory in the defensive battle of Alam Halfa in late August and early September, the Eighth Army went on the offensive in October 1942 and decisively defeated the Axis at the Second El Alamein. The Axis forces were pursued through Libya and the capital Tripoli was captured by Eighth Army in January 1943.