Many thousands of years ago the barbarous tribes of Yajuj and Ma'juj were imprisoned behind an iron wall built by Zulqarnayn. Referred to in the Qur'an in Surah Al-Kahf. Zulqarnayn was a Muslim Arab (fathul bari) who lived at the time of the Prophet Ibraheem and not Alexander the Great as it is commonly known. From amongst one of the four that ruled the entire world (the other three being Prophet Sulayman, Nimrod & Buktnasr) he was a pious and just king, provide with all forms of strength through which he was able to carry his conquests and missions.Once he carried a mission in three directions, the far west, far east, and then in a northerly direction. Travelling first in the westerly direction, he conquered the lands he passed through establishing the laws of Allah therein until he reached the setting of the sun. There he met people that didn't believe in Allah. Given a choice of punishing them for their kufr or being lenient by inviting them first to Islam; he chose the latter and addressed them, ''Those evil-doers who do injustice to themselves by rejecting Allah will be punished by death in this world and the hereafter, the fire of hell is their abode. As for those who accept the invitation and believe in Allah they will be treated leniently and in the hereafter Jannah is their place of rest.''After the journey towards the west he made preparation for the journey towards the east. Conquering the lands he passed through, establishing he laws of Allah therein. He continued travelling in the easterly direction until he reached the rising of the sun. In this area of the east he saw a nation receiving the sunshine without any obstruction and they were dealt with like the previous people in the west.After the journey to the east he started his northern Journey, he kept on travelling until he reached the midst of two mountains, it was here he came across a tribe who complained to him about the tribes of Ya'juj and Ma'juj. Ya'juj and Ma'juj inhabited the land behind the mountains, plundered them, committed bloodshed, and then ran away. Observing Zulqarnain's power they asked to set a barrier in return for a wage for their protection from the disaster and bloodshed, which they often bore at the hands of Ya'juj Ma'juj. Refusing to accept any wealth he built an iron wall with their help which Ya'juj Ma'juj could not cross or pierce.https://www.central-mosque.com/index.php/Tafseer/dhulqar.html