The settlement around a church built at the behest of the Patriarchs
of Aquileia in the March of Carniola was first mentioned in a 1296 deed, it
received market rights from Duke Henry of Carinthia. In the 14th century it was
held by the Carinthian counts of Ortenburg, was inherited by the Counts of
Celje in 1418, and, upon the death of Count Ulrich II of Celje in 1456, fell to
the Habsburg Emperor Frederick III. With the Duchy of Carniola it was
incorporated into the Inner Austrian lands of the Habsburg Monarchy. From 1867
until 1918, the town's post office used the bilingual name