There were 16 such Mahajanapadas in the Indian subcontinent: Magadha, Anga, Vajji, Vatsa, Malla, Kasi, Kosala, Chedi, Panchala, Ashmaka, Avanti, Surasena, Kuru, Matsya, Gandhara, and Kamboja.
Magadha was the most powerful among the Mahajanapadas.
Rajagriha was the first capital of Magadha. Later it was Pataliputra