Gaya is one of the thirty-eight districts of the Indian state of Bihar. It was officially established on 3 October 1865. The district has a common boundary with the state of Jharkhand to the south. Gaya city is both the district headquarters and the second-largest city in Bihar.