He was elected Archbishop of Alexandria after Egypt was recaptured by Emperor Heraclius. At the imminent invasion of the Arabs into Egypt , George abandoned Alexandria .