The temple was erected during 1787 by Queen Ahilyabai. A beautiful sacred place on the banks of Phalgu river, it is surrounded by rugged rocks on three sides and water on the fourth side. The second-largest city of Bihar is that ancient city which has been talked about in Ramayana (where Lord Rama went to Gaya to do pind-daan of his father Dashrath) and Mahabharata. It has also witnessed the enlightenment of Gautama Buddha. Following this, Gaya is a home to the legendary Vishnupad Temple, which is dedicated to Lord Vishnu.