The counts of Gorizia began construction on their castle complex in the 11th century. A small chapel was built at the foot of the castle in 1398.
During most of this century the city has served as a major crossing into Yugoslavia (now Slovania).