in 1487, the city was fortified with an outer wall 10 km (6.2 mi) in circumference by mahmud begada, the grandson of sultan. the fortification consisted of twelve gates, 189 bastions and over 6,000 battlements.