Magadha (Sanskrit: मगध) formed one of the sixteen Mahā-Janapadas (Sanskrit: "Great Countries") or kingdoms in ancient India. The core of the kingdom was the area of Bihar south of the Ganges; its first capital was Rajagriha (modern Rajgir) then Pataliputra (modern Patna). Magadha expanded to include most of Bihar and Bengal with the conquest of Licchavi and Anga respectively, followed by much of eastern Uttar Pradesh and Orissa. The ancient kingdom of Magadha is heavily mentioned in Jain and Buddhist texts. It is also mentioned in the Ramayana, Mahabharata, Puranas.
The earliest reference to the Magadha people occurs in the Atharva-Veda where they are found listed along with the Angas, Gandharis, and Mujavats. Two of India's major religions, Jainism, and Buddhism have roots in Magadha; two of India's greatest empires, the Maurya Empire and Gupta Empire, originated from Magadha. These empires saw advancements in ancient India's science, mathematics, astronomy, religion, and philosophy and were considered the Indian "Golden Age". The Magadha kingdom included republican communities such as the community of Rajakumara. Villages had their own assemblies under their local chiefs called Gramakas. Their administrations were divided into executive, judicial, and military functions.