A hill fort is a type of earthworks used as a fortified refuge or defended settlement, located to exploit a rise in elevation for defensive advantage. They are typically European and of the Bronze and Iron Ages. Some were used in the post-Roman period. The fortification usually follows the contours of a hill, consisting of one or more lines of earthworks, with stockades or defensive walls, and external ditches. Hill forts developed in the Late Bronze and Early Iron Age, roughly the start of the first millennium BC, and were in use in many Celtic areas of central and western Europe until the Roman conquest.
Viljandi castle (Estonian: Viljandi ordulinnus, German: Ordensburg Fellin) of Teutonic Order, construction of which started 1224 in place of a former hillfort, was one of the strongest castles in Livonia. Finally destroyed in the Polish-Swedish wars in early 17th century, ruins of it now form a popular resort area in Viljandi, Estonia.
The crusaders of Sword Brethren conquered the hill fort at the place of later main castle in 1223. A year later, construction of stone fortifications started. Viljandi was chosen as the high seat of the order.
The convent house, a typical form of castle of Teutonic Knights, was erected late 13th – early 14th century. In the following centuries the castle was extended and fortified further. It was badly damaged in the Polish-Swedish wars in early 17th century and not repaired any more. In 18th century, the ruins were used for quarrying stones for construction work in Viljandi.
The first excavations in the castle were performed in 1878–1879. In recent decades, these have turned to almost yearly events.
Currently the ruins form a popular resort area just outside of central Viljandi. An open-air stage is located in the former central courtyard.