As a military outpost of the Habsburg Monarchy, Karlovac was the site of the trial and execution of the best-known leader of the rebel Uskoks from the coastal fort of Senj, Ivan Vlatković. He was executed in Karlovac on 3 July 1612 as an example to his troops who were creating difficulties for the Habsurgs by their piracy against Venetian shipping on the Adriatic Sea, and by marauding raids into the Ottoman hinterland. In 1615 their piracy went so far as creating an open war between Venice and Austria. When the Treaty of Paris (ratified in Madrid) was concluded in 1617, bringing an end to the war between Venice and the Habsburgs, under the terms of the treaty the Uskok families were forcibly removed from Senj and disbanded into the hinterland, most notably in the Žumberak hills near Karlovac.