The earliest settlement in what is now Bareilly was established in 1537 by Jagat Singh Katehriya who named it 'Bans-Bareli' after his two sons Bansaldev and Bareldev. The town came under the rule of Mughals in 1569 and had become the capital of a local pargana by 1596. The foundation of the modern city of Bareilly was laid by Mughal governor Mukrand Rai in 1657, and in 1658,
Bareilly is renowned for being the place of origin of the Barelvi Movement, a Sunni Islamic movement formed by notable scholar Imam Ahmed Raza Khan Qadri to counter the growing influence of Wahabism. His shrine, located at the Bareilly Sharif Dargah, .