After the downfall of the prior Gupta Empire in the middle of the 6th century, North India reverted to small republics and small monarchical states ruled by Gupta rulers. Harsha was a convert to Buddhism. He united the small republics from Punjab to central India, and their representatives crowned Harsha king at an assembly in April 606 giving him the title of Maharaja when he was merely 16 years old. Harsha belonged to Kanojia. He 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 Xuan Zang visited the court of Harsha and wrote a very favorable account of him, praising his justice and generosity.