Malwa became part of the Gupta Empire during the reign of Chandragupta II (375–413), also known as "Vikramaditya", who conquered the region, driving out the Western Kshatrapas. The Gupta period is widely regarded as a golden age in the history of Malwa, when Ujjain served as the empire's western capital. The astronomer Varahamihira was based in Ujjain, which emerged as a major centre of learning, especially in astronomy and mathematics. Around 500, Malwa re-emerged from the dissolving Gupta Empire as a separate kingdom; in 528, Yasodharman of Malwa defeated the Hunas, who had invaded India from the north-west. During the seventh century, the region became part of Harsha's empire, who disputed the region with the Chalukya king Pulakesin II of Badami in the Deccan.