Coin of Harshavardhana, circa 606-647 CE.
|Ruler of North India|
|Reign||c. 606 - c. 647 CE|
|Religion||Hinduism, Buddhism (later)|
Harsha (c. 590-647 CE), also known as Harshavardhana, was an Indian emperor who ruled North India from 606 to 647 CE. He was a member of the Vardhana dynasty; and was the son of Prabhakarvardhana who defeated the Alchon Huna invaders, and the younger brother of Rajyavardhana, a king of Thanesar, present-day Haryana. At the height of Harsha's power, his Empire covered much of North and Northwestern India, extended East till Kamarupa, and South until Narmada River; and eventually made Kannauj (in the present Uttar Pradesh state) his capital, and ruled till 647 CE. Harsha was defeated by the south Indian Emperor Pulakeshin II of the Chalukya dynasty in the Battle of Narmada when Harsha tried to expand his Empire into the southern peninsula of India.
The peace and prosperity that prevailed made his court a centre of cosmopolitanism, attracting scholars, artists and religious visitors from far and wide. The Chinese traveller Xuanzang visited the court of Harsha and wrote a very favourable account of him, praising his justice and generosity. His biography Harshacharita ("Deeds of Harsha") written by Sanskrit poet Banabhatta, describes his association with Thanesar, besides mentioning the defence wall, a moat and the palace with a two-storied Dhavalagriha (white mansion).
After the downfall of the Gupta Empire in the middle of the 6th century, North India was split into several independent kingdoms. The northern and western regions of India passed into the hands of a dozen or more feudatory states. Prabhakara Vardhana, the ruler of Sthanvisvara, who belonged to the Vardhana family, extended his control over neighbouring states. Prabhakar Vardhana was the first king of the Vardhana dynasty with his capital at Thaneswar. After Prabhakar Vardhana's death in 605, his eldest son, Rajya Vardhana, ascended the throne. Harsha Vardhana was Rajya Vardhana's younger brother. This period of kings from the same line has been referred to as the Vardhana dynasty in many publications.
Sources suggest that Harsha belongs to Kshatriya Varna as described in Harshacharita written by Banabhatta. Xuanzang mentions an emperor named Shiladitya, who had been claimed to be Harsha. Xuanzang mentions that this king belonged to "Fei-she". This word is generally translated as Vaishya (a varna or social class). According to the, Mañju?r?-m?la-kalpa, a 7-8th century CE Buddhist text, in the Imperial History of India by K.P Jayswal; Harsha was born of King Vishnu (vardhana) and his family were of Vaishya caste. They first became ministers, then Kings. The style vardhana seems to have been borrowed from their imperial ancestors. 
Harsha's sister Rajyashri had been married to the Makuhari 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 accept this affront on his family. So he marched against Devagupta and defeated him. However, Shashanka, king of Gauda in Eastern Bengal, then 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, but this campaign remained inconclusive and beyond a point, he turned back. Harsha ascended the throne at the age of 16.
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 centre of cosmopolitanism, attracting scholars, artists and religious visitors from far and wide. The Chinese traveller Xuanzang visited the court of Harsha, and wrote a very favourable account of him, praising his justice and generosity.
Pulakeshin II defeated Harsha on the banks of Narmada in the winter of 618-619. Pulakeshin entered into a treaty with Harsha, with the Narmada River designated as the border between the Chalukya Empire and that of Harshavardhana.
Xuanzang describes the event thus:
In 648, Tang dynasty emperor Tang Taizong sent Wang Xuance to India in response to Harsha having sent an ambassador to China. However once in India he discovered Harsha had died and the new king Aluonashun (supposedly Arun?sva) attacked Wang and his 30 mounted subordinates. This led to Wang Xuance escaping to Tibet , also secured a reported Buddhist relic for China. He fought back to India with Tibet and Licchavi force, during the war, an apocryphal story written many centuries later, it's claimed that the new king was among the captives during Wang Xuance's attack. 
Like many other ancient Indian rulers, Harsha was eclectic in his religious views and practices. His seals describe his ancestors as sun-worshippers, his elder brother as a Buddhist, and himself as a Shaivite. His land grant inscriptions describe him as Parama-maheshvara (supreme devotee of Shiva), and his play Nagananda is dedicated to Shiva's consort Gauri. His court poet Bana also describes him as a Shaivite.
According to the Chinese Buddhist traveller Xuanzang, Harsha was a devout Buddhist. Xuanzang states that Harsha banned animal slaughter for food, and built monasteries at the places visited by Gautama Buddha. He erected several thousand 100-feet highs stupas on the banks of the Ganges River, and built well-maintained hospices for travellers and poor people on highways across India. He organized an annual assembly of global scholars and bestowed charitable alms on them. Every five years, he held a great assembly called Moksha. Xuanzang also describes a 21-day religious festival organized by Harsha in Kannauj; during this festival, Harsha and his subordinate kings performed daily rituals before a life-sized golden statue of the Buddha.
Since Harsha's own records describe him as Shaivite, his conversion to Buddhism would have happened, if at all, in the latter part of his life. Even Xuanzang states that Harsha patronised scholars of all religions, not just Buddhist monks.
Harsha is widely believed to be the author of three Sanskrit plays Ratnavali, Nagananda and Priyadarsika. While some believe (e.g., Mammata in Kavyaprakasha) that it was Bana, Harsha's court poet who wrote the plays as a paid commission, Wendy Doniger is "persuaded, however, that king Harsha really wrote the plays ... himself."