Derinkuyu in Cappadocia is the deepest of several underground cities carved into soft volcanic rock. Extending to a depth of approximately 85 meters, it was large enough to shelter as many as 20,000 people along with their livestock and food stores. It was used for centuries as a hiding place during foreign invasions. The city is a marvel of ancient engineering, featuring a sophisticated ventilation system with 52 shafts that provided fresh air even to the lowest levels. For defense, each floor could be sealed off from the inside by massive circular stone doors that could only be moved from one side. It also contained wine and oil presses, stables, cellars, storage rooms, refectories, and chapels, making it a fully functional subterranean society.