In 1766, Hyder Ali of Mysore captured Kozhikkode (Calicut) and then Guruvayur. He demanded 10,000 fanams in ransom to spare the temple. The ransom was paid but due to insecurity pilgrims receded. On the request of the Malabar Governor, Shrnivasa Rao, Hyder Ali granted a Devadaya to save the temple. Later, in 1789 AD, Tippu Sultan invaded the province. Tippu destroyed the smaller shrines and set fire to the Temple, but it was saved due to timely rain. Tippu lost to the Travancore and the English in 1792. The idol, which had been hidden underground in anticipation of the Tippu's takeover, was re-installed on 17 September 1792.