origin of the temple of Somanatha is shrouded in obscurity; nor is its history complete as
revealed by legends and traditions. Its location in and association with Prabhasa have, no
doubt, besides imparting some celebrity, contributed towards its antiquity, it thus
literally being the abode of the "Lord of the Moon."
But whatever its origin, the stable element in its story is the
strong determination on the part of the local populace to keep the temple alive and to
restore its glory even in the face of devastating raids which had become more or less
regular after the great expedition led against it by Sultan Mahmud of Ghazni in A.D. 1026.
The result was that after each invasion some reconstruction or rehabilitation in the
structure was inevitable.