Magadha came into prominence under the leadership of Bimbisara who belonged to Haryanka dynasty. He was a man of determination and political foresight. He became the king in second half of the 6th century BC. He added to the prestige and strength of Magadha by his policy of matrimonial alliance and annexations. Marriage relations with different princely families gave enormous diplomatic prestige and paved the way for the expansion of Magadha westward and eastward. Bimbisara built his capital at Rajgir which was called Girivraja at that time. It was surrounded by five hills and cyclopean walls which are examples of earliest Indian stone architecture. Bimbisara for the first time laid down the foundation of an efficient administration in Magadha.
He himself appointed the ministers and never ignored their advice. Officers were divided into various categories according to their work and the beginning of an administrative system took root. The chief officers were known as Mahamantras the executive as Sabhatthaka who was in charge of all affairs and interests; the judicial officer as Voharika and the military officer as Senanayak. The head of a village was called Gramika. A lot of autonomy was given to various provinces in the kingdoms. He constructed several canals and roads appointed several new officers for the regular collection of revenue. It helped him in increasing his financial resources and military strength. Both Jains and Buddhists claim Bimbisara as a follower of their respective religions. It is stated in the Mahavamsa that Bimbisara ruled for 52 years. Ajatashatru the son murdered his father in about 493 BC and became the king.