Axis forces were at one point only 150 miles from Cairo but Allied soldiers finally gained the upper hand following the British victory at El Alemain in 1942 , and Egypt remained firmly in British hands for the rest of the war .
Axis forces got within 150 miles of Cairo until they were fought back by the Allied soldiers .