Subsequently during Khan Jahan’s second viceroyalty, Aurangzib built a wall round the city in 1682, to protect it from the incursions of the Mahrattas; and in 1696 he erected a similar fortified wall for Begampura. The city wall is terraced, and is of solid masonry, but of no great height, being in many parts not more than fourteen feet. The battlements are loop-holed, and the merlins over the gateways and at certain places along the wall, are machicolated; while semi-circular bastions surmounted by towers, occur at each flanking angle, and at regular intervals along the works. The wall is pierced with thirteen gateways, exclusive of a small postern wicket, and its total length is a little over six miles.