The last great king of the Neo-Assyrian Empire, Ashurbanipal, was a rare warrior-scholar who could read and write. He sent scribes across Mesopotamia to collect and copy every significant text they could find, resulting in a library of over 30,000 cuneiform tablets. It was the first systematically organized library in the world, with works categorized by subject matter. When the capital of Nineveh was destroyed by the Medes and Babylonians in 612 BCE, the fire that burned the palace actually baked and preserved the clay tablets, allowing them to survive for 2,500 years. This library is our primary source for much of what we know about Mesopotamian history, including the Epic of Gilgamesh.