Some of humanity's earliest habitats were based inside caves. Technological and architectural progression may have made cave structures less common, but our history is littered with incredible buildings carved into caves, cliffs, and mountains.
Here are some of the most amazing examples of cave structures - from castles and strongholds to temples and cities.
1. A 2,000-year-old cave city carved into a mountain: Petra, Jordan
Located in southern Jordan, the ancient city of Petra is one of the world's most famous sites featuring buildings carved into a rockface. Settlement in the area dates back as far as 9,000 BC, and the earliest records of the city are dated to around 312 BC.
The city is carved into the slopes of Jebel al-Madhbah, a mountain whose rose-colored sandstone gives Petra its iconic shade. The city features tombs, temples, a treasury, and an amphitheater. It has been a UNESCO World Heritage Site since 1985.
2. A beautiful mountain castle with hidden passages: Predjama Castle, Slovenia
It is said that the castle served as a refuge to the disgraced knight, Erazem Lueger, in the 15th century. Legends say that Erazem was able to slip in and out of the castle unnoticed, thanks to a narrow passage beneath the building. Today, tourists can climb this passage themselves as they traverse the underground cave system.
3. A cave temple where religions once coexisted peacefully: Ellora, India
Carved into the basalt cliffs of the Charanandri Hills lie the Ellora Caves, a massive complex of Hindu, Buddhist, and Jain temples and monuments. The structures date from between 600 to 1000 CE.
It is understood that all the temples were built at a similar time, revealing a culture of harmony and tolerance in ancient India. The site features 100 caves and was named a UNESCO World Heritage Site in 1983.
4. Try the cave-dwelling life experience for yourself: Hotel Marhala, Tunisia
Tunisia's Hotel Marhala allows guests to sleep in what was once an underground town, dating back to the 4th century. Located near the Sahara Desert, the caves allow residents to keep cool in the intense summer heat.
Hotel Marhala markets itself on providing a genuine troglodyte experience of living in a cave. The hotel is best known for appearing briefly in Star Wars: A New Hope; and guests can take Star Wars-themed tours of other cave homes in the area.
5. An alpine cave structure mystery: Kropfenstein Castle, Switzerland
Carved high into the Alps, not much is known about the mysterious Kropfenstein Castle. From studying its architecture, historians have concluded that it was probably built sometime in the 13th century.
By the end of the 15th century, the castle was no longer inhabited and had began to fall into ruin. Thanks to the protection of a rocky overhang, many parts of the castle still stand, despite their state of disrepair.
6. The mountain structure resting place of ancient kings: Lycian Tombs, Turkey
Dating from around the 4th century BC, some of the most famous cave structures in the world, the Lycian Tombs, can be found in Dalyan, Turkey. The ancient Lycians are said to have built their tombs on high ground to allow angels to carry the dead to the afterlife.
Dalyan's tombs were the final resting place of the kings of Kaunos. Today, the ornate tombs carved into the cliff-face attract thousands of tourists to the area.
7. Austria's mountain castles: Ruine Puxer-Loch and Castle Schallaun, Austria
Located in Styria, Austria the Ruine Puxer-Loch and Castle Schallaun are two castle caves built into the same rock face. Records of the Puxer-Loch date back to the 12th century, whereas the dates regarding Schallaun are lesser-known.
The castles were abandoned by the 16th century but remained in relatively good condition for another 300 years, thanks to the protection of the cave. Schallaun can be visited by climbing the rock face, though there is evidence that there was once a path connecting both castles.
8. One of America's largest cave dwellings: Cliff Palace, USA
Located in Colorado, the enormous Cliff Palace was a residential complex set into a sandstone cliff in the Mesa Verde National Park. Evidence suggests that the complex was built, and continually expanded upon, between the 12th and 13th Centuries.
The Cliff Palace was home to the ancestral Pueblo, a native American people who lived throughout Colorado, Utah, Arizona, and New Mexico. By 1300 the site was abandoned, and it wasn't rediscovered until 1888.
9. Ruins of a fortress in an ancient cave: Balm Castle, Switzerland
Switzerland's Canton of Solothurn is home to the ruins of Balm Castle, a cave stronghold from the mid-11th century. The natural cave in which it was built measures 20 meters (66 feet) wide and 6 meters (20 feet) deep.
The bulk of the structure was made from wood, which is why so little of it remains today. The site was excavated in both 1939 and 1941, and it was found that the cave had been inhabited by humans since ancient times.
10. Some of the best examples of ancient Indian art: Ajanta Caves, India
Carved into a 76.2 meters (250 feet) wall of rock, lies the Ajanta Caves - a series of temples and monuments dedicated to the Buddha. The earliest monuments in the area date as far back as the second century BC, and the most recent date back to 480 CE.
Housed within the caves are some of the best surviving examples of ancient Indian art. In 1983 UNESCO named the Ajanta Caves a World Heritage Site.
11. A mountain castle built using the cave's natural walls: Rappenstein Castle, Switzerland
Little is known about Switzerland's Rappenstein Castle, other than it was built sometime in the mid-13th century and operated as a military stronghold. Located within the Cosenz Gorge, the castle included two walls built against the natural walls of the cave.
The castle was abandoned by the late 15th century and proceeded to fall into ruin. Today tourists can visit the site, where much of the original walls are still standing.
12. An incredible medieval cave temple: Lalibela, Ethiopia
Considered one of the holiest sites in Ethiopia, Lalibela is best known for its Medieval churches which were cut into the rock. Dating from the 7th to the 13th centuries, the layout of the churches was meant to be a symbolic representation of Jerusalem.
Situated over 2,500 meters (8,200 feet) above sea level, the churches are an incredible feature of their mountainous surroundings. Today Lalibela attracts many tourists, as well as Christian pilgrims who come to worship at the site.
13. Longmen Caves, China: thousands of hand-carved caves and statues
Located in China's Henan province, these 2,345 caves house as many as 100,000 stone statues. The Longmen Caves (sometimes referred to as the Longmen Grottoes) date back to the 5th and 8th centuries AD.
The caves are all carved by hand into the limestone rock of the Xiangshan and Longmenshan mountains over centuries. They remain an incredible example of Chinese art and sculpture, particularly that of the Tang dynasty.
With that cave-based architectural fans, our list must come to an end. These are but some of the finest mountain caves, cave temples, and other cave-related structures from around the world.
If you ever find yourself in the local vicinity of any of these structures, it might be worth your time to make a beeline to check them out!