 Omiš received a charter from Andrew II of Hungary in 1207, and remained under the nominal protection of Hungary until 1444, when both Omiš and Poljica accepted the suzerainty of Venice, while retaining their internal freedom.The occupation of Bosnia as well as by the Ottoman Empire gravely impacted the Republic of Poljica.Notable battles were fought by the local forces against the Turks in 1530 and 1686, and in both occasions the Ottoman army was repelled.