Probably both Agag and Gog are textual corruptions.
Havet's contention (in La Modernite des prophetes) that Gog represents the Parthians (40 B.C.) has little or nothing in its support.
Musa into Asia Minor to find out all about the Seven Sleepers which he discovered in the neighbourhood of Arabissus,' and Sallam the Interpreter to explore the situation of the famous wall of Gog and Magog, which he reached at the north-west frontier of China.
But as this northern foe had failed to appear Ezekiel re-edited this prophecy in a new form as a final assault of Gog and his hosts on Jerusalem, and thus established a permanent dogma in Jewish apocalyptic, which in due course passed over into Christian.
Andrew's report to his sovereign, whom he rejoined in 1251 at Caesarea in Palestine, appears to have been a mixture of history and fable; the latter affects his narrative of the Mongols' rise to greatness, and the struggles of their leader, evidently Jenghiz Khan, with Prester John; it is still more evident in the position assigned to the Tatar homeland, close to the prison of Gog and Magog.