Chera dynasty
The existence of temple was first mentioned in Sangam Literature as one of the major temples under Chera Dynasty. Cheras were adherent worshipers of Lord Shiva. When Chera dynasty ended, the place fell into the hands a few Nair nobles who renamed the place as Ernakulam (corrupt form of original word- Eere Naal Kulam meaning Pond with water always) in recognition of the famous sacred pond of this temple. Soon this area came under reign of Kochi Kingdom. The Kochi Rulers, due to the siege of Fort Kochi by the Dutch in the 17th century, moved their capital to Ernakulam and established a Palace close to this temple, facing the temple pond (The Tank Shed Palace seen behind current Durbar Hall). This helped the temple to gain prominence, due to royal patronage. The temple deity was declared as protector of Ernakulam city (Nagara Devata),