It’s said that Somraj (the moon god) first built a temple in Somnath, made of gold; this was rebuilt by Ravana in silver, by Krishna in wood and by Bhimdev in stone. The current serene, symmetrical structure was built to traditional designs on the original coastal site; it’s painted a creamy colour and has a little fine sculpture. The large, black Shiva lingam at its heart is one of the 12 most sacred Shiva shrines, known as jyoti linga.
A description of the temple by Al-Biruni, an 11th century Arab traveller, was so glowing that it prompted a visit in 1024 by a most unwelcome tourist: the legendary looter Mahmud of Ghazni, from Afghanistan. At that time the temple was so wealthy that it had 300 musicians, 500 dancing girls and even 300 barbers. Mahmud of Ghazni took the town and temple after a two-day battle in which it’s said 70,000 Hindu defenders died. Having stripped the temple of its fabulous wealth, Mahmud destroyed it. So began a pattern of Muslim destruction and Hindu rebuilding that continued for centuries. The temple was again razed in 1297, in 1394 and finally in 1706 by Aurangzeb, the notorious Mughal ruler. After that, the temple wasn’t rebuilt until 1950.
There's a very heavy security presence around the temple compound. Cameras, mobile phones and bags must be left at the cloakroom before you enter. You'll have to pass through a couple of metal detectors and will be physically searched to ensure that you've complied with these rules.
Colourful dioramas of the Shiva story line the north side of the temple garden, though it’s hard to see them through the hazy glass. A 35-minute sound-and-light show (₹20; 8pm and 8.45pm) highlights the temple nightly.