Koprivnik Castle (Slovenian: Grad Koprivnik, Slovenian: Vranja peč, German: Burg Rabensberg)[1] is a castle ruin above the village of Sveta Trojica, near Moravče in central Slovenia.
The castle was probably built in the 12th century, in order to protect the trade route from the Moravče Valley to the Lower Sava Valley. Its first recorded owner was Ulschalcus von Rabensberg, of the knights of Rabensberg (Slovenian: Koprivniški), first mentioned in 1214. The castle was abandoned in the 13th century, when the owners relocated to Krumperk Castle, and it was in ruins by the 17th century.[1] The estate was inherited by the Hohenwarths, followed by the sisters of St. Clare from Mekinje. In the second half of the 19th century, the castle became known as Old Castle (Slovenian: Stari grad) or Freight Castle (Slovenian: Tovorov grad), named after the nearby freight route from the Central Sava Valley.[1] In 1930, the land surrounding the ruins was purchased by Senator .[1] Remains visible today include the foundations of a defensive tower and some walls; most of the rest of the structure is covered by detritus. Much of the worked stone was recycled for the construction of nearby Holy Trinity Church.