Zrin Castle was first mentioned in the 13th century as a fortress ruled by the Babonić clan. Between 1328 and 1347, it was possessed by the members of Iločki family. In 1347, King Louis I the Great bestowed the fortress to the noble Šubić family who then changed their family name after it, becoming the Zrinski. It remained in their possession until the Ottoman invasion and conquest of the region, which led to the fortress falling to them on 20 October 1577. It wasn't until 1718 that the castle was retaken from the Ottomans.
References:Inverness Castle sits on a cliff overlooking the River Ness. The red sandstone structure evident today was built in 1836 by architect William Burn. It is built on the site of an 11th-century (c. 1057) defensive structure. Today, it houses Inverness Sheriff Court.
The castle is said to have been built by Máel Coluim III of Scotland, after he had razed to the ground the castle in which Macbeth of Scotland according to much later tradition, murdered Máel Coluim"s father Donnchad I of Scotland, and which stood on a hill around 1 km to the north-east.
The first Inverness Castle was partially destroyed by King Robert I of Scotland and a replacement castle was sacked in the 15th century by the Clan Donald during the Siege of Inverness (1429). The castle was occupied during the Raid on Ross in 1491.
In 1548 another castle with tower was completed by George Gordon, 4th Earl of Huntly (1514–1562). He was constable of the castle until 1562.