ðiːz tɹɐdˈɪʃənz hˌæd sʌm ˌoʊvɚlˈæp ɔːlɹˈɛdi; ɡˈɑːɡ ænd mˈæɡɑːɡ ɑːɹ ɐmˌʌŋ ðə nˈeɪʃənz tɹˈæpt bᵻhˌaɪnd ðə wˈɔːl ɪnðɪ ˌælɪɡzˈændɚ ɹoʊmˈæns, ænd ðɪ ˈoʊnli wˈʌnz nˈeɪmd ɪnðə vˈɜːʒən ʌvðə stˈoːɹi ɐpˈɪɹɪŋ ɪn kwɚɹˈæn sˈɜːɹə ˈælkˈɑːf ðə kˈeɪv ˈeɪtiːn:ˈeɪɾi nˈaɪn, wˌaɪl ðə fˈoːɹtiːnθsˈɛntʃɚɹi wˈɜːk ðə tɹˈævəlz ʌv sˌɜː dʒˈɑːn mˈændvɪl ɛksplˈɪsɪtli ɐsˈoʊsɪˌeɪts ðə kənfˈaɪnd nˈeɪʃənz wɪððə tˈɛn lˈɔst tɹˈaɪbz.
These traditions had some overlap already; Gog and Magog are among the nations trapped behind the wall in the Alexander Romance, and the only ones named in the version of the story appearing in Quran Sura al-Kahf (The Cave) 18:89, while the 14th-century work The Travels of Sir John Mandeville explicitly associates the confined nations with the Ten Lost Tribes.