Gaya is a city, municipal corporation and the administrative headquarters of Gaya district and Magadh division of the Indian state of Bihar. Gaya is 116 kilometres south of Patna and is the state's second-largest city, with a population of 470,839. The city is surrounded on three sides by small, rocky hills, with the Phalgu River on its eastern side.