 Around 1024 CE, during the reign of Bhima I, Mahmud of Ghazni raided Gujarat, and plundered the Somnath temple.According to an 1169 CE inscription, Bhima rebuilt the temple.This inscription does not mention any destruction caused by Mahmud, and states that the temple had "decayed due to time".