The original temple is said to be built by the Pandavas. However, the current shrine was said to be constructed by Adi Shankaracharya in the 8th century A.D.