The castle was built in the late 13th century by the noble Rabensbergs from Koprivnik. The predecessor of the current castle is first mentioned in 1338 as a possession of Herkules of Krumperk, of the noble house of Kreutberg.