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.
Matsya was one of the sixteen Mahajanapadas mentioned in the Buddhist text Anguttara Nikaya. The founder of the kingdom of the Matsya was Virata. It consisted of the present-day Alwar, Jaipur and Bharatpur.