Light returns with the rise of the Gupta dynasty, which roughly marks the beginning of modern Hinduism and of a reaction against Buddhism. Though nothing is known of the fortunes of Pataliputra, the ancient imperial city of the Mauryas, during the first three centuries of our era, it continued to exist. In 320 a local Raja known as Candragupta I increased his dominions and celebrated his coronation by the institution of the Gupta era. His son Samudra Gupta continued his conquests and in the course of an extraordinary campaign, concluded about 340 A.D., appears to have received the submission of almost the whole peninsula. He made no attempt to retain all this territory but his effective authority was exercised in a wide district extending from the Hugli to the rivers Jumna and Chambal in the west and from the Himalayas to the Narbudda. His son Candragupta II or Vikramaditya added to these possessions Malwa, Gujarat and Kathiawar and for more than half a century the Guptas ruled undisturbed over nearly all northern India except Rajputana and Sind. Their capital was at first Pataliputra, but afterwards Kausambi and Ayodhya became royal residences.
The fall of the Guptas was brought about by another invasion of barbarians known as Hunas, Ephthalites[119] or White Huns and apparently a branch of the Huns who invaded Europe. This branch remained behind in Asia and occupied northern Persia. They invaded India first in 455, and were repulsed, but returned about 490 in greater force and overthrew the Guptas. Their kings Toramana and Mihiragula were masters of northern India till 540 and had their local capital at Sialkot in the Panjab, though their headquarters were rather in Bamyin and Balkh. The cruelties of Mihiragula provoked a coalition of Hindu princes. The Huns were driven to the north and about 565 A.D. their destruction was completed by the allied forces of the Persians and Turks. Though they founded no permanent states their invasion was important, for many of them together with kindred tribes such as the Gurjaras (Gujars) remained behind when their political power broke up and, like the Sakas and Kushans before them, contributed to form the population of north-western India, especially the Rajput clans.
The defeat of the Huns was followed by another period of obscurity, but at the beginning of the seventh century Harsha (606-647 A.D.), a prince of Thanesar, founded after thirty-five years of warfare a state which though it did not outlast his own life emulated for a time the dimensions and prosperity of the Gupta Empire. We gather from the account of the Chinese pilgrim Hsuean Chuang, who visited his court at Kanauj, that the kings of Bengal, Assam and Ujjain were his vassals but that the Panjab, Sind and Kashmir were independent. Kalinga, to the south of Bengal, was depopulated but Harsha was not able to subdue Pulakesin II, the Calukya king of the Deccan.