Within the Holy Roman Empire, the County of Gorizia for centuries had to forge alliances with noble houses and weave skillful diplomatic schemes to safeguard its autonomy from the conquering aims of the Venetian Republic, the House of Habsburg and the Patriarchate of Aquileia.