In medieval times, the area was within the heartland of the Khalaj tribe. The Khalji dynasty of India had origin from this city. Some of the Khalaj were Pashtunized,[10][11][12] transforming into the Ghilji tribe of Pashtuns.[13]