As per another legend, the temple is believed to have been built by Parashurama, one of the ten avatars of Hindu god Vishnu. During the passage of time, the temple was covered by vegetation and was restored by Kundavarma of Alupa dynasty during the 9th century. There are also views that the temple was built by Ballal family of Attavar to commemorate a Malabar Princess.