The Nanda dynasty ruled in northern part of the Indian subcontinent during the 4th century BCE, and possibly during the 5th century BCE. In 326 BC, Alexander invaded India, after crossing the river Indus he advanced towards Taxila.
Ramgupta was the elder son of Samudragupta. Samudragupta was succeeded by Ramagupta according to some legends, but Chandragupta II killed him. It is also believed that during the tenure of Ramagupta, the Gupta empire was invaded by a powerful Shaka kin.