The Ottomans invaded Turopolje on 30th September 1469 and thus came dangerously close to Zagreb. This threat to the security of the town made it necessary for the citizens of Grič and Kaptol to strengthen the existing fortifications and build additional ones.
After the fall of Bosnia, Bishop Osvald Thuz had a wall erected around the cathedral and his palace and a moat dug. In 1476/1478 the canons built a defensive wall around the hill of Kaptol.
This changed the social system and the town plan of Kaptol. Along the west wall of the Kaptol fortifications a settlement (street) developed - Opatovina, to which new settlers were invited. However, the fortifications built by Bishop Thuz were not strong enough: between 1512 and 1520 a citadel was built in the early Renaissance style, parts of which are extant. Fearing the Ottomans, the inhabitants of Gradec manned their fortification with Spanish mercenaries and acquired more weapons.
The threat of war gradually subsided and taxes were reduced after the great victory at Sisak in 1593, although the army gathered near Zagreb for the war with the Ottomans as late as 1639.
After the liberation of Slavonia from the Ottomans and the end of the Great War in the late 17th century, Zagreb could finally breathe a sigh of relief.