 Historians believe that during their eastern migration, Indo-European language speaking people moved towards the middle Gangetic region and settlements like Kampil and Amritpur - a small town about 25 km from Shamsabad across the Ganges - also grew up.During most of the ninth to twelfth centuries, Shamsabad - then known as 'Khor Nagar' ('Khor' meaning king and 'nagar' meaning city) - was ruled first by the Pratihars, then by the Gaharwars dynasties from Kannauj.It is variously said that one Prajan Pal or Jai Singh Dev or Rai Singh Gaharwar was the ruler at the time of Shams Uddin Iltitmish's invasion circa 1212 and Shamsabad is named after the latter.