The original concept is most likely derived from a pre-Islamic Persian prototype that probably relied partly on Indian elements, but the work as we have it was collected over many centuries by various authors, translators and scholars across the Arab World. The tales themselves trace their roots back to ancient and medieval Arabic, Persian, Indian, Egyptian and Mesopotamian folklore and literature. In particular, many tales were originally folk stories from the Caliphate era, while others, especially the frame story, are most probably drawn from the Pahlavi Persian work Hazār Afsān (Persian: هزار افسان, lit. Thousand Tales). Though the oldest Arabic manuscript dates from the 14th century, scholarship generally dates the collection's genesis to around the 9th century.