<P> Rajya Vardhana's and Harsha's sister Rajyashri had been married to the Maukhari king, Grahavarman . This king, some years later, had been defeated and killed by king Devagupta of Malwa and after his death Rajyashri had been cast into prison by the victor . Harsha's brother, Rajya Vardhana, then the king at Thanesar, could not stand this affront on his family, marched against Devagupta and defeated him . But it so happened at this moment that Shashanka, king of Gauda in Eastern Bengal, entered Magadha as a friend of Rajyavardhana, but in secret alliance with the Malwa king . Accordingly, Shashanka treacherously murdered Rajyavardhana . On hearing about the murder of his brother, Harsha resolved at once to march against the treacherous king of Gauda and killed Shashanka in a battle . Harsha ascended the throne at the age of 16 . </P> <P> As North India reverted to small republics and small monarchical states ruled by Gupta rulers after the fall of the prior Gupta Empire, Harsha united the small republics from Punjab to central India, and their representatives crowned him king at an assembly in April 606 giving him the title of Maharaja . Harsha established an empire that brought all of northern India under his control . The peace and prosperity that prevailed made his court a center of cosmopolitanism, attracting scholars, artists and religious visitors from far and wide . The Chinese traveler Xuanzang visited the court of Harsha, and wrote a very favourable account of him, praising his justice and generosity . </P> <P> Pulakeshin II defeated Harsha on the banks of Narmada in the winter of 618 - 619 A.D. </P> <P> In 648, Tang dynasty emperor Tang Taizong sent Wang Xuance to India in response to Harsha sending an ambassador to China . However once in India he discovered Harsha had died and the new king attacked Wang and his 30 mounted subordinates . This led to Wang Xuance escaping to Tibet and then, mounting a joint force of over 7,000 Nepalese mounted infantry and 1,200 Tibetan infantry attacked the Indian state on June 16 . The success of this attack brought Wang Xuance the prestigious title of the "Grand Master for the Closing Court ." He also secured a reported Buddhist relic for China . </P>

Who was the last hindu king of north india