As Dot says, Montgomery, but he couldn't have done it without the brilliance of his predecessor, General Auchinlek, who fought the Germans to a standstill in the first battle of Alamein. (there were two)
He was withdrawn because he wouldn't go on the attack on Churchills orders, because of insufficient men and equipment.
He was replaced by Montgomery, who also waited until he had the men and equipment.
Auchinleck was possibly the best General we had.
My father was there all through it.