The Royal Library of Ashurbanipal was established in the 7th century BCE at Nineveh, capital of the Neo-Assyrian Empire. It contained over 30,000 clay tablets with cuneiform texts on subjects ranging from medicine and astronomy to literature, including the famous Epic of Gilgamesh. The library was destroyed when Nineveh fell in 612 BCE, but the clay tablets were preserved in the ruins until their rediscovery in the mid-19th century.