During the Delhi Sultanate period, majority of the local population were converted to Islam. A large city was situated at the site of the present village of Mehdiabad, northwest of present day Hafizabad.
Throughout the Delhi Sultanate period, a considerable number of local residents embraced Islam. The area that now comprises the village of Mehdiabad, situated northwest of today's Hafizabad, was once home to an important city.