According to British historian Matthew Atmore Sherring the district of Bareilly was formerly a dense jungle inhabited by a race of Ahirs and was called Tappa Ahiran. In the beginning of the thirteenth century, when the Delhi Sultanate was firmly established, Katehr was divided into the provinces of Sambhal and Budaun. But the thickly forested country infested with wild animals provided just the right kind of shelter for rebels. And indeed, Katehr was famous for rebellions against imperial authority. During the Sultanate rule, there were frequent rebellions in Katehr. All were ruthlessly crushed. Sultan Balban (1266–1287) ordered vast tracts of jungle to be cleared so as to make the area unsafe for the insurgents.