During the War of the League of Cambrai against Venice, Gradisca was conquered by Emperor Maximilian I in 1511, and thenceforth it was a Habsburg possession ruled within the County of Gorizia as part of the Inner Austrian lands. In 1615 a Venetian attempt to reconquer it initiated the War of Gradisca. The town was however kept by the Imperial House of Habsburg; in 1647 Emperor Ferdinand III made it the capital of an autonomous County of Gradisca and sold the territory to his confident John Anthony of Eggenberg.