 It was a military outpost of Prithviraj Chauhan against Muhammad Ghori.In 1192 it became a part of Ghauri Sultanate after the defeat of Prithviraj Chauhan.It was refounded by Emperor Firuz Shah Tughlaq in 1361 AD at the behest of Sayyid Jalaluddin Bukhari, the spiritual guide of that King.