Open sesame

"Open sesame" (Sésame, ouvre-toi; افتح يا سمسم) is a magical phrase in the story of "Ali Baba and the Forty Thieves" in Antoine Galland's version of One Thousand and One Nights. It opens the mouth of a cave in which forty thieves have hidden a treasure.

Etymology
The phrase first appears in Antoine Galland's French translation of  One Thousand and One Nights (1704–1717) as Sésame, ouvre-toi (English, "Sesame, open yourself"). In the story, Ali Baba overhears one of the 40 thieves saying "open sesame". His brother later cannot remember the phrase, and confuses it with the names of grains other than sesame, becoming trapped in the magic cave.

Galland's phrase has been variously translated from the French into English as "Sesame, open", "Open, sesame" and "Open, O sesame". "Open sesame" is the conventional arrangement, however.

Sesame seeds grow in a seed pod that splits open when it reaches maturity, and the phrase possibly alludes to unlocking of treasures. Babylonian magic practices used sesame oil. But it is not certain that the word "sesame" actually refers to the sesame plant or seed. Sesame may be a reduplication of the Hebrew šem 'name', i.e., God, or a kabbalistic word representing the Talmudic šem-šāmayīm ("shem-shamayim"), 'name of heaven'.

Classification
Open sesame has been classified by Stith Thompson as motif element D1552.2, "Mountain opens to magic formula".