The Gates of Alexander was a legendary barrier supposedly built by Alexander the Great in the Caucasus to keep the uncivilized barbarians of the north (typically associated with Gog and Magog) from invading the land to the south. The gates were a popular subject in medieval travel literature, starting with the Alexander Romance in a version from perhaps the 6th century. The wall has been frequently identified with the Caspian Gates of Derbent, Russia (see below) and with the Pass of Dariel or Darial.