Magadha was ruled by different dynasties during the different time periods. The first important dynasty to rule Magadha was Haryanka dynasty established by Bimbisara. This dynasty was overthrown by the Nandas, established by Mahapadma Nanda. The Nanda dynasty was further overthrown by the Mauryas, established by Chandragupta Maurya. After this, Magadha was ruled by Sungas and Kanvas.