Image by Andrea Pucci Getty Images

Predjama Castle is 9km from Postojna and is one of the world's most dramatic castles. It teaches a clear lesson: if you want to build an impregnable fortification, put it in the gaping mouth of a cavern halfway up a 123m cliff. Its four storeys were built piecemeal over the years from 1202, but most of what you see today is from the 16th century. It looks simply unconquerable.

An audioguide (available in 15 languages) details the site's highlights and history. The castle holds great features for kids of any age – holes in the ceiling of the entrance tower for pouring boiling oil on intruders, a very dank dungeon, a 16th-century chest full of treasure (unearthed in the cellar in 1991), and an eyrie-like hiding place at the top called Erazem's Nook, named for Erazem (Erasmus) Lueger.

Lueger was a 15th-century robber-baron who, like Robin Hood, stole from the rich to give to the poor. During the wars between the Hungarians and the Austrians, Erazem supported the former. He holed up in Predjama Castle and continued his daring deeds with the help of a secret passage that led out from behind the rock wall. In 1484 the Austrian army besieged the castle, but it proved impregnable. Erazem mocked his attackers, even showering them with fresh cherries to prove his comfortable situation. But the Austrians had the last laugh – finally hitting him with a cannonball as he sat on the toilet. An ignoble fate for a dashing character.

The cave below the castle is part of the 14km Predjama cave system. It's open to visitors from May to September (closed in winter so as not to disturb its colony of bats during their hibernation). Another adventure option is to visit the narrow Erazem's Passage, through which the besieged knight was connected with the outside world (some climbing skills are required for this). Tours need to be booked at least three days in advance; caving tours range in price from €24 to €80.

Gostilna Požar is a simple, traditional restaurant conveniently located next to the ticket kiosk and in perfect view of the castle. Basic rooms are available (double €54).

Joint tickets can be bought for the castle and Postojna Cave. In July and August, a handy shuttle-bus service runs between the cave and the castle; it's free for guests who buy a combined ticket for both attractions.