A cave castle (German: Höhlenburg) or grotto castle (German: Grottenburg) is a residential or refuge castle that has been built into a natural cave. It falls within the category of hill castles. Unlike other types (such as water castles), such castles can only be assaulted from the front, or by drilling through the rock above; the gateway is usually located in the middle of a rock face, which makes it much more difficult to penetrate. Archaeological discoveries have revealed that caves were used as places of refuge as early as the Stone Age. The first medieval cave castles emerged in the 11th and 12th centuries. In the 14th and 15th centuries this type became more widespread, especially in certain parts of France and Switzerland.