Gorizia was first recorded in 1001 AD when Emperor Otto III donated the village and castle to the Patriarch of Aquileia. Over centuries, Gorizia grew under rule of different powers, including the Hasburgs in 1500 and incorporation into French and Austrian territories at different times. In World War I, Italy gained control of Gorizia in 1916. After the war, Gorizia was officially annexed to Italy but lost surrounding areas to Yugoslavia in 1947, with the national border drawn just outside the town center. Today, Gorizia remains divided from neighboring Nova Gorica in Slovenia by the legacy of this border.