As with the wheel, cities and legal codes, the earliest examples of written literature appear to have originated in ancient Mesopotamia. The Sumerian civilization first developed writing around 3400 B.C., when they began making markings on clay tablets in a script known as cuneiform.

Their texts usually consisted of economic and administrative documents, but by the third millennium B.C., Sumerian scribes were also copying down essays, hymns, poetry and myths. Two of their oldest known literary works are the “Kesh Temple Hymn” and the “Instructions of Shuruppak,” both of which exist in written versions dating to around 2500 B.C.

The former is an ancient ode to the Kesh temple and the deities that inhabited it, while the latter is a piece of “wisdom literature” that takes the form of sagely advice supposedly handed down from the Sumerian king Shuruppak to his son, Ziusudra. One of Shuruppak’s proverbs warns the boy not to “pass judgment when you drink beer.” Another counsels that “a loving heart maintains a family; a hateful heart destroys a family.”

While Shuruppak’s fatherly wisdom is one of the most ancient examples of written literature, history’s oldest known fictional story is probably the “Epic of Gilgamesh,” a mythic poem that first appeared as early as the third millennium B.C. The adventure-filled tale centers on a Sumerian king named Gilgamesh who is described as being one-third man and two-thirds god. Over the course of twelve clay tablets’ worth of text, he goes on a classic hero’s journey that sees him slay monsters, rub elbows with the gods and search for the key to immortality—all with predictably tragic results.

The Epic of Gilgamesh started out as a series of Sumerian poems and tales dating back to 2100 B.C., but the most complete version was written around the 12th century B.C. by the Babylonians. The story was later lost to history after 600 B.C., and it wasn’t until the mid-19th century that archaeologists finally unearthed a copy near the Iraqi city of Mosul. Since then, scholars have hailed the 4,000-year-old epic as a foundational text in world literature.