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.