The kingdom of Jodhpur was ruled by the Rathores, who controlled much of Marwar in western Rajasthan including Bikaner, the other desert fiefdom. The clan traces its lineage back to Rama, the mythical hero of the Hindu epic Ramayana and through him back to the sun god Surya himself. Which is why the Rathores also call themselves Suryavanshi or family of the sun. In modern times, the first Rathore ruler chronicled by history was Nayan Pal, who established his kingdom at Kannauj near modern day Kanpur in Uttar Pradesh in 470 A.D. Here the dynasty flourished until much of north India began to acquire a distinctly Islamic flavour towards the close of the 12th century. Mohammad Ghori the Afghan annexed Kannauj in 1192, forcing the Rathore ruler Raja Jai Chand to flee which he did carrying the Rathore panchranga or the five-coloured flag with him. But dispirited by the defeat he drowned while crossing the Ganges.