📜 LEGEND · EXP. Nº0270 ACTIVE

Ali Baba and the Forty Thieves

Ali Baba and the Forty Thieves is a legend from Unnamed town in Persia (Galland, 1717) · recorded in Paris, 1709, IQ — a folk story passed down over generations. This file collects its origins, its meaning and how it has been retold.

Where does the legend of Ali Baba and the Forty Thieves come from?

Location
Unnamed town in Persia (Galland, 1717) · recorded in Paris, 1709, IQ
Kind of legend
Folk tale
Coordinates
33.315, 44.366
Testimonies
0
Last updated
LOCATION

What is the legend of Ali Baba and the Forty Thieves?

Everybody files Ali Baba under the medieval Arab world. The oldest text of the tale is four pages of French, written in Paris on Monday 27 May 1709 in the private diary of the orientalist Antoine Galland, and the pages are still there, in the Bibliothèque nationale de France. Galland had heard the story that day from Hanna Diyab, a young Maronite from Aleppo who had come to France with the collector Paul Lucas. He headed his summary "Morgiane's cleverness, or The forty thieves exterminated by the skill of a slave girl": the woodcutter is not in the title, and he is not called Ali Baba either, but Hogia Baba. The magic words are already fixed — "Sesame ouvre toi" — and the town is not Baghdad but "a town of Persia towards the confines of the Indies". Galland only worked his notes into a tale in 1711, and it was printed in 1717, two years after his death, in the eleventh volume of his Mille et une nuit. No Arabic manuscript of it older than 1709 has ever been found; the one that was announced as such turned out to be signed by its own French copyist.
Ali Baba and the Forty Thieves, Unnamed town in Persia (Galland, 1717) · recorded in Paris, 1709, Iraq
“Cassim”, an American colour plate by Maxfield Parrish for The Arabian Nights: Their Best-Known Tales (1909). It shows Cassim trapped in the cave — the exact moment of the tale — but it is a 1909 illustration, not an old Eastern image. Image: Maxfield Parrish · Public domain

What is the history of Ali Baba and the Forty Thieves?

No manuscript of the Thousand and One Nights written before the eighteenth century contains "Ali Baba". The oldest text of the tale that anybody has been able to read is not in Arabic and is not medieval: it is four pages of French written in Paris on Monday 27 May 1709, in the private diary of the orientalist Antoine Galland, and the pages are still there, in the Bibliothèque nationale de France, catalogued as Français 15277 and free to consult page by page online. The man who supplied the story was Hanna Diyab, a young Maronite Christian from Aleppo who had travelled to France in the company of the collector Paul Lucas. Galland first met him on Sunday 17 March 1709; on 25 March he noted that Hanna knew "several very beautiful Arabic tales" and had promised to write them down for him. On 5 May Galland noted that Hanna had "finished" the tale of the lamp — "Aladdin" — which he had been given in writing; between 6 May and 2 June, in eleven storytelling sessions, came fifteen more, and Galland summarised those in his diary as he listened. Ten of the sixteen ended up in print; six have never been published as tales at all. The diary page is worth reading against the story everybody knows. Galland heads it "Les finesses de Morgiane, ou Les quarante voleurs exterminez par l'addresse d'une esclave" — Morgiane's cleverness, or The forty thieves exterminated by the skill of a slave girl. The heroine is in the title and the woodcutter is not. He is not called Ali Baba either: throughout the four pages Galland writes "Hogia Baba", the Arabic honorific khawaja. His brother is "Cassem". And the opening line places the story nowhere near Baghdad: "Dans une ville de la Perse vers les confins des Indes il y avoit deux freres" — in a town of Persia towards the confines of the Indies. The magic words are already fixed, in the form we still use: "Sesame ouvre toi", and "Sesame ferme toi" to close the rock. Galland did nothing with the notes for two years and three months. On 24 August 1711 he wrote that he had been going back through the summaries of Diyab's performances to decide which ones would fill his eleventh volume. He died in 1715. Volumes eleven and twelve of "Les mille et une nuit" were printed in Paris by Florentin Delaulne in 1717, after his death, and the eleventh opens with the Histoire d'Ali Baba et de quarante voleurs exterminés par une esclave. Between the notebook and the printed page the hero had been renamed and the slave girl had been moved out of the title into a subordinate clause. The setting had not changed: the printed tale still begins "dans une ville de Perse, aux confins des etats de votre Majeste". Almost immediately the tale's missing Arabic ancestor became a scholarly problem, and it produced one of the strangest chases in the history of the Nights. In 1860 the Bodleian Library bought a small octavo Arabic manuscript for eight shillings; a bookseller's mark on the back showed it had come from the Librairie A. Franck, rue de Richelieu, Paris. It contained two stories, the second of them Ali Baba, and the scribe signed the colophon "Yuhanna ibn Yusuf Warisi". In 1910 the American arabist Duncan B. Macdonald edited that text for the Journal of the Royal Asiatic Society, sixty pages of Arabic with notes, and argued that it descended from a Syrian folk tale independent of Galland. He could not identify the scribe. He asked, in print, whether "Warisi" might be "a European name masquerading in Arabic", and answered himself: "yet that seems hardly likely." It was. Muhsin Mahdi concluded in 1994 that the Arabic Ali Baba had been composed by the copyist himself, from Galland's French, "as another French schoolboy might have done in Greek or Latin". Katia Zakharia then put a face and a life to the name: Jean-Georges Varsy, a French orientalist of the Egyptian campaign, whose autobiography and whose Arabic commentary on al-Firuzabadi's Qamus she found and published in Arabica in 2015. In a second article, in 2017, she argued that once you know Varsy was an allophone copyist rather than an incompetent one, the received verdict deserves a reasonable doubt again. The manuscript still exists; the certainty about it does not. A second chain runs east. Having no Arabic text to work from, Richard Burton explained in his 1887 foreword that he had hunted for Persian, Turkish or Hindustani versions of what he called the "Gallandian histories", and that a friend had sent him from Bombay a lithographed Urdu version by Totaram Shayan which contained them all; J. F. Blumhardt englished it for him. So Burton's "Ali Baba and the Forty Thieves" is an English rendering of an Urdu rendering of Galland's French — which is why his robbers cry "Open, O Simsim!" and not "Open Sesame". Hanna Diyab wrote a book of his own, in Arabic, around 1763, about his journey to France. He never names Galland; he remembers an old man in charge of the Arabic books at the library who asked for his help, and he remembers telling stories so that the book could be finished. His name does not appear anywhere in the twelve volumes.

Timeline: the documented record of Ali Baba and the Forty Thieves

  1. 1704-1717 Antoine Galland publishes Les mille et une nuit, contes arabes, in twelve volumes. The BnF catalogues the set 1704-1717; the first volumes are translated from a Syrian Arabic manuscript, and only the last four contain tales that have no Arabic manuscript behind them.
  2. 17 and 25 March 1709 Galland meets Hanna Diyab, a Maronite from Aleppo brought to France by the traveller Paul Lucas, and a week later notes in his diary that Hanna knows "several very beautiful Arabic tales" and has promised to write them down for him.
  3. Monday 27 May 1709 Diyab tells the tale in Paris. Galland summarises it the same day over four pages of his diary, under the heading "Les finesses de Morgiane, ou Les quarante voleurs exterminez par l'addresse d'une esclave". The hero is called Hogia Baba, his brother Cassem, the setting is "une ville de la Perse vers les confins des Indes", and the words are already "Sesame ouvre toi" and "Sesame ferme toi". This is the oldest text of the story that exists.
  4. 24 August 1711 Two years and three months after the telling, Galland records that he has been going back through his summaries of Diyab's performances to choose which would fill the eleventh volume. Macdonald later used that gap as an argument that Galland must have had a written text as well as his notes.
  5. 1717 Two years after Galland's death, Florentin Delaulne prints tomes eleven and twelve in Paris. Tome eleven opens with the Histoire d'Ali Baba: the hero has been renamed from Hogia Baba to Ali Baba and Morgiane has lost the title, but the town is still in Persia.
  6. 1852 Ernst Meier prints "Simson, thu dich auf!", taken down orally at Pfullingen in Swabia: seven robbers, a mountain that opens to a name. His own note judges that the German tale grew from a dwarf legend "though probably not without the influence of the Arabic story of the forty thieves".
  7. 1857 "Simeliberg" appears in the last edition of the Grimms' Kinder- und Hausmärchen as tale 142, where it had stood since 1815: twelve wild men, a bare mountain, "Berg Semsi, Berg Semsi, thu dich auf", and a greedy brother who dies inside for forgetting the name.
  8. 1860 The Bodleian Library buys a small Arabic octavo for eight shillings; a bookseller's mark shows it came from the Librairie A. Franck in the rue de Richelieu, Paris. It is now MS Bodl. Orient. 633 and it contains an Arabic Ali Baba.
  9. 1887 Richard Burton, unable to find an Arabic text, publishes his Ali Baba in the third supplemental volume of his Nights, englished by J. F. Blumhardt from Totárám Sháyán's Hindustani lithograph — an English version of an Urdu version of Galland's French. His robbers say "Open, O Simsim!". The appendix by W. A. Clouston sets the tale beside the Dummburg legend, Grimm's Simeliberg and Herodotus' Rhampsinitus.
  10. 1910 Duncan B. Macdonald edits the Bodleian Arabic text in the Journal of the Royal Asiatic Society and argues it is independent of Galland. He cannot identify the copyist who signs the colophon "Yuhanna ibn Yusuf Warisi"; he asks in print whether it might be "a European name masquerading in Arabic", and rules it out: "yet that seems hardly likely."
  11. 1994 Muhsin Mahdi concludes that the Arabic Ali Baba was composed by that copyist out of Galland's French, "as another French schoolboy might have done in Greek or Latin".
  12. 2015 and 2017 Katia Zakharia identifies the copyist as Jean-Georges Varsy, a French orientalist of the Egyptian campaign, from an autobiography and an Arabic commentary on al-Firuzabadi's Qamus that she discovered, and shows he was a competent arabist. In a second article she argues that this reopens a reasonable doubt about whether the Arabic text is merely a translation of Galland.
  13. 2018 Ulrich Marzolph publishes the first complete English translation of the summaries Galland took down from Diyab, with the dates and tale types of all sixteen tales, and records that none of them is known from Arabic manuscript tradition predating the storyteller's performance.

Is there a rational explanation for Ali Baba and the Forty Thieves?

There is nothing supernatural here to explain away: this is a fiction, and it has been one since the day it was written down. What can be tested is its pedigree, and the tests come out badly for the way the tale is usually presented. The claim that Ali Baba is an ancient Arabic story from Baghdad fails on two counts at once. As of August 2026 no Arabic manuscript of it predating Diyab's 1709 performance has ever been reported, and of the sixteen tales Diyab gave Galland only one, "The Ebony Horse", is known from indigenous Arabic manuscript tradition at all; it is also the only one that appears in the standard printed Arabic editions of the Nights. And the story does not take place in Baghdad in any version we have. Galland's diary puts it in an unnamed town of Persia towards the confines of the Indies, and his printed text repeats it. Whoever moved Ali Baba to Baghdad did it later and without a text. The forty thieves are worth counting, because Galland's own arithmetic is stricter than his title. The captain has two of his men beheaded for failing to mark the right door. He then buys nineteen mules and thirty-eight leather oil jars, one full and thirty-seven empty, and hides thirty-seven robbers inside them; Morgiane scalds those thirty-seven and later stabs the captain: the text counts "trente-huit voleurs, en y comprenant le faux marchand leur capitaine", thirty-eight thieves including the false merchant who led them. Thirty-eight plus the two executed makes forty exactly. The tale keeps its own accounts. The magic word has a longer argument attached to it. Galland writes "Sesame, ouvre-toi", and Cassim, who forgets it, tries "Orge, ouvre-toi" — barley — and then the names of other grains. Burton, working from Urdu, printed "Open, O Simsim!" and glossed simsim as Sesamum orientale. Germany has cousins: the Grimms' "Simeliberg" (KHM 142), where twelve wild men open a mountain with "Berg Semsi, Berg Semsi, thu dich auf", and Ernst Meier's "Simson, thu dich auf!", taken down orally at Pfullingen and printed in 1852 with seven robbers instead of forty. Their collectors disagreed in print about what that means, and the disagreement is not settled. Meier judged that his tale grew from a German dwarf legend "though probably not without the influence of the Arabic story of the forty thieves". W. A. Clouston, writing in 1887 for Burton's supplemental volume, argued the reverse: that "Simson" and "Semsi" are corruptions of "Simsim" or "Samsam" and "seem to show that the story did not become current in Germany through Galland's work". Clouston also corrected W. Grimm's note on the point, and derived the second half of Ali Baba — the quartered brother, the sewn-up body, the marked doors — from the Rhampsinitus story in Herodotus. None of that is proof of anything older than 1709; it is a live argument, and it should be reported as one rather than resolved in either direction. Finally, the cautionary tale for anyone who wants an Arabic original: it has already been found once. Macdonald had a real Arabic manuscript, correctly described, correctly edited, and he read the copyist's own name in the colophon — and the name was the answer he had ruled out.

Can you visit Ali Baba and the Forty Thieves?

There is no site. The tale names no town, no rock and no forest: Galland's text says only "a town in Persia, towards the confines of the Indies", and nothing in the story's documented history attaches it to a real cave anywhere. Any place selling itself as Ali Baba's cave is trading on the name, not on the text. What can actually be visited or read is the paperwork, and most of it is free. The autograph is in Paris. Galland's diary for 1708-1709 is Bibliothèque nationale de France, Département des Manuscrits, Français 15277, held at the Richelieu site (5 rue Vivienne / 58 rue de Richelieu, Paris 2e). The whole volume is digitised on Gallica at no charge: the Ali Baba entry runs from manuscript page 138, where the heading "Lundi 27 de May" is followed by a note on the Ten Viziers, to page 143, and the tale's own title stands at the top of page 140. In Gallica's viewer those are images f88 to f90. Consulting the original in the reading room needs a reader's card and a justification; the scans need nothing. The disputed Arabic manuscript, Bodleian MS Or. 633, is in Oxford and is consulted at the Weston Library with a Bodleian reader's card. You do not need to go: Macdonald printed the whole Arabic text, with his introduction and notes, in the Journal of the Royal Asiatic Society for 1910, and that volume is on the Internet Archive. The tale itself is free in both of its historical shapes. Galland's French is on French Wikisource, in the Le Normant edition of 1806; Burton's English, the one that goes through Urdu, is on Project Gutenberg with Clouston's appendix of variants attached. Reading the two side by side takes an evening and shows more about how the story travelled than any summary. Aleppo, where Hanna Diyab was born about 1688 and to which he returned in July 1710, is the one real place the documented history of this tale touches in the Levant.

Sources consulted

  1. Antoine Galland, «Journal d'Antoine Galland (1708-1709), autograph, pp. 138-143: "Les finesses de Morgiane, ou Les quarante voleurs exterminez par l'addresse d'une esclave"» — Bibliothèque nationale de France, Département des Manuscrits, Français 15277. Consulted directly in the free Gallica digitisation, images f88-f90: the heading "Lundi 27 de May" and the note on the Ten Viziers on p. 138, the tale's title and opening ("Dans une ville de la Perse vers les confins des Indes", "Hogia Baba", "Sesame ouvre toi", "Sesame ferme toi") on pp. 140-143, 1709 archive
  2. Antoine Galland (trad.), «Histoire d'Ali Baba et de quarante voleurs exterminés par une esclave» — First printed in Les mille et une nuit, tome onzième, Paris: F. Delaulne, 1717 (posthumous). Full French text read and word-searched in the Le Normant edition of 1806, t. VI, pp. 350-440, transcribed on French Wikisource: "dans une ville de Perse, aux confins des états de votre Majesté", "Sésame, ouvre-toi", Cassim's "Orge, ouvre-toi", the nineteen mules and thirty-eight jars, the "trente-huit voleurs, en y comprenant le faux marchand leur capitaine", 1717 book
  3. Bibliothèque nationale de France, «Les mille et une nuit [sic]. Tome onzième : contes arabes / trad. par M. Galland — catalogue record» — BnF, Catalogue général, notice FRBNF36063752. Gives publisher F. Delaulne (Paris) and date 1717 for tome onzième, and the same for tome douzième (notice FRBNF36063753); the set as a whole is catalogued 1704-1717, 1717 archive
  4. Ulrich Marzolph, «The Man Who Made the Nights Immortal: The Tales of the Syrian Maronite Storyteller Ḥannā Diyāb» — Marvels & Tales, vol. 32, no. 1 (2018), pp. 114-129. Full text read: the table of the sixteen tales with their diary dates and tale types (Ali Baba = no. 12, 27 May 1709, ATU 676+954, Galland vol. 11.1), the original title and the hero's original name "Hoja Bābā", Galland's note of 24 August 1711 on filling the eleventh volume, and the statement that no Diyāb tale is known from Arabic manuscript tradition predating his performance, 2018 academic
  5. Duncan B. Macdonald, «"Ali Baba and the Forty Thieves" in Arabic from a Bodleian MS» — Journal of the Royal Asiatic Society of Great Britain and Ireland, 1910, art. IX, pp. 327-386. Read in the Internet Archive scan: the description of MS Bodl. Orient. 633, bought by the Bodleian in 1860 for 8s. with the bookseller's mark "Rue Richelieu à Paris, Librairie A. Franck 390", the colophon signed "Yuhanna ibn Yusuf Warisi", Macdonald's question whether it is "a European name masquerading in Arabic" and his "yet that seems hardly likely", and his quotation of Galland's diary abstract of 27 May 1709 after Zotenberg, 1910 academic
  6. Katia Zakharia, «Jean-Georges Varsy et l'« Histoire d'Ali Baba ». Révélations et silences de deux manuscrits récemment découverts» — Arabica, vol. 62, no. 5-6 (2015), pp. 652-687. Abstract in the author's own words consulted through the HAL record (hal-01456751), including her quotation of Mohsen Mahdi's verdict that Varsy "composed [Ali Baba] in Arabic as another French schoolboy might have done in Greek or Latin", 2015 academic
  7. Katia Zakharia, «La version arabe la plus ancienne de l'« Histoire d'Ali Baba » : si Varsy n'avait pas traduit Galland ? Réhabiliter le doute raisonnable» — Arabica, vol. 64, no. 1 (2017), pp. 50-77. Abstract consulted through the HAL record (hal-01884314): the article "intends to reintroduce a reasonable doubt" about the received idea, following Mahdi, that the Arabic Ali Baba recorded by Varsy is a poor translation from Galland's French, 2017 academic
  8. Richard F. Burton, with W. A. Clouston, «Supplemental Nights to the Book of the Thousand Nights and a Night, vol. III — Foreword, "Story of Ali Baba and the Forty Thieves" (p. 369) and Appendix: Variants and Analogues by W. A. Clouston» — Privately printed by the Kama Shastra Society, 1887. Full text read on Project Gutenberg: Burton's foreword on failing to find an Arabic text and using Totárám Sháyán's Hindustani lithograph englished by J. F. Blumhardt; "Open, O Simsim!" and "Shut, O Simsim!"; Kasim's "Open, O Barley!"; footnote 291 glossing simsim as Sesamum orientale; and Clouston's comparison with the Dummburg legend, with Grimm's Simeliberg and Meier's "Open, Simson", and with the Rhampsinitus story in Herodotus, 1887 book
  9. Ernst Meier, «Simson, thu dich auf! (no. 53), in Deutsche Volksmärchen aus Schwaben, pp. 187-188, with the editor's note on p. 311» — Stuttgart: C. P. Scheitlin, 1852. Text and note read in the German Wikisource transcription of the scan: taken down orally at Pfullingen, seven robbers in a mountain opened with "Simson, thu' dich auf!"; Meier's note holds that the tale seems to have grown out of a German dwarf legend "jedoch wohl nicht ohne Einwirkung der arabischen Erzählung von den 40 Räubern", 1852 book
  10. Brüder Grimm, «Simeliberg (KHM 142), in Kinder- und Haus-Märchen, Band 2, 7. Auflage, pp. 259-261» — Göttingen: Dieterich, 1857; in the collection since 1815. Text read in the German Wikisource transcription of the scan: twelve wild men open a bare mountain with "Berg Semsi, Berg Semsi, thu dich auf" and close it with "thu dich zu", and the rich brother dies inside for forgetting the name, 1857 book

Reviewed by V. Serrano on 2026-08-17 · How we verify our content

📎 Source: Enigma Atlas

Your call, agent: I saw this too 0 Credible 0 Doubtful 0

💬 Field testimonies (0)

No testimonies yet. Add the first.

Add your testimony

🔒 Log in to add a testimony