The name Bihar derived from the word 'Vihara' means monastery. It was a great religious center for Jains, Hindus and Buddhists. From the 6th century BC to the 5th century AD Bihar was ruled by a succession of rulers and major empires. In the 3rd century BC Chandragupta Maurya ruled from the great city of Pataliputra (patna). His grandson Emperor Ashoka succeeded him. The Magadha dynasty rose to glory during the reign of the Guptas in 4th and 5th centuries. The dynasty was followed by the Palas of Bengal who ruled until 1197. The Muslim rulers also left indelible mark on the region from the 12th to 17th century.