[4][5][6] The temple was reconstructed several times in the past after repeated destruction by multiple Muslim invaders and rulers, notably starting with an attack by Mahmud Ghazni in January 1026.
The 11th-century Persian historian Al-Biruni states that Somnath has become so famous because "it was the harbor for seafaring people and a station for those who went to and fro between Sufala in the country of Zanj (east Africa) and China".
[4] For example, the Mahabharata (c. 400 CE in its mature form)[citation needed][31] in Chapters 109, 118 and 119 of the Book Three (Vana Parva), and Sections 10.45 and 10.78 of the Bhagavata Purana state Prabhasa to be a tirtha on the coastline of Saurashtra.
[40][note 6] In 1026, during the reign of Bhima I, the Turkic Muslim ruler Mahmud of Ghazni raided and plundered the Somnath temple, breaking its jyotirlinga.
This inscription, states Thapar, could suggest that instead of destruction it may have been a desecration because the temple seems to have been repaired quickly within twelve years and was an active pilgrimage site by 1038.
He states Mahmud's motives as, "raids undertaken with a view to plunder and to satisfy the righteous iconoclasm of a true Muslim... [he] returned to Ghazna laden with costly spoils from the Hindu temples."
Al-Biruni obliquely criticizes these raids for "ruining the prosperity" of India, creating antagonism among the Hindus for "all foreigners", and triggering an exodus of scholars of Hindu sciences far away from regions "conquered by us".
[55] According to Thapar, the "50,000 killed" is a boastful claim that is "constantly reiterated" in Muslim texts, and becomes a "formulaic" figure of deaths to help highlight "Mahmud’s legitimacy in the eyes of established Islam".
[56] After being exhorted by Bhava Brihaspati, a Pashupata ascetic, Kumarapala (r. 1143–72) rebuilt the Somnath temple in "excellent stone and studded it with jewels," according to an inscription in 1169.
[57][58][59] During its 1299 invasion of Gujarat, Alauddin Khalji's army, led by Ulugh Khan, defeated the Vaghela king Karna, and sacked the Somnath temple.
[65] As late as the 14th century, Gujarati Muslim pilgrims were noted by Amir Khusrow to stop at that temple to pay their respects before departing for the Hajj pilgrimage.
In the 19th century novel The Moonstone by Wilkie Collins, the diamond of the title is presumed to have been stolen from the temple at Somnath and, according to the historian Romila Thapar, reflects the interest aroused in Britain by the gates.
India's Deputy Prime Minister Vallabhbhai Patel came to Junagadh on 12 November 1947 to direct the stabilization of the state by the Indian Army, at which time he ordered the reconstruction of the Somnath temple.
[89] The efforts of colonial era archaeologists, photographers and surveyors have yielded several reports on the architecture and arts seen at the Somnath temple ruins in the 19th century.
He wrote:[91] The great temple of Somnath stands on a rising ground on the north-west side of Pattan, inside the walls, and is only separated by them from the sea.
It is perfect, but the images which have once adorned both the interior and exterior of the building are mutilated, and the black polished stones which formed its floor have been removed by the citizens for less pious purposes.
Near it is a cupola, supported on pillars, to mark the grave of the sultan's cashkeeper, with many others; and the whole city is encircled by the remains of mosques, and one vast cemetery, ‘The field of battle, where the “infidels” were conquered, is also pointed out, and the massy walls, excavated ditch, paved streets, and squared-stone buildings of Pattan itself, proclaim its former greatness.
[91] Burnes also summarized some of the mythologies he heard, the bitter communal sentiments and accusations, as well as the statements by garrisoned "Arabs of the Junagar [Junagadh] chief" about their victories in this "infidel land".
He states:[92] Pattan, and all the part of the country wherein it is situated, is now under a Mohamedan ruler, the Nawab of Junagadh, and the city itself offers the most curious specimen of any I have ever seen of its original Hindu character, preserved throughout its walls, gates, and buildings, despite Mohammedan innovations and a studied attempt to obliterate the traces of paganism ; even the very musjids, which are here and there encountered in the town, have been raised by materials from the sacred edifices of the conquered, or, as it is said by the historians of Sindh, “the true believers turned the temples of the idol worshippers into places of prayer.” Old Pattan is to this day a Hindu city in all but its inhabitants—perhaps one of the most interesting historical spots in Western India.
[...] Somnath assumed the appearance it now presents, of a temple evidently of pagan original altered by the introduction of a Mohammedan style of architecture in various portions, but leaving its general plan and minor features unmolested.
[93] His survey report states:[90] The old temple of Somanatha is situated in the town, and stands upon the shore towards its eastern end, being separated from the sea by a heavily built retaining wall which prevents the former from washing away the ground around the foundations of the shrine.
[95] The architect of the new Somnath temple was Prabhashankarbhai Oghadbhai Sompura, who worked on recovering and integrating the old recoverable parts with the new design in the late 1940s and early 1950s.
Sections can be seen with "beautiful vertical mouldings, on either side of the main front doorway", states Cousens, and this suggests that the destroyed temple was "exceedingly richly carved".
The destruction of the Somnath temple – called Sūmanāt in Persian literature, and the killing of Hindus has been portrayed as a celebrated event in numerous versions of history, stories and poems found in Persia written over the centuries.
For Hindus, particularly Hindu nationalists, it is a question of their heritage, their sense of sacred time and space, states Peter van der Veer.
The rebuilding was a symbol, it was Hindu repudiation of almost a thousand years of Muslim domination, oppression, and reassertion of a safe haven for Hindus in post-partitioned India.
[101][111][112] In the modern era textbooks of Pakistan, the sack of Somnath temple is praised and the campaign of Sultan Mahmud of Ghaznavi is glorified as a "champion of Islam".
According to Syed Zaidi – a scholar of Islamist Militancy, a school book in Pakistan titled Our World portrays Somnath temple as a "place where all the Hindu rajas used to get together" and think about "fighting the Muslims".
According to Ashok Behuria and Mohammad Shehzad, the Somnath legacy is narrated in this textbook as, "according to most historians Mahmud invaded India seventeen times to crush the power of the Hindu Rajas and Maharajas who were always busy planning conspiracies against him ... After the fall of Punjab, the Hindus assembled at Somnath — which was more of a political centre than a temple — to plan a big war against Mahmud.
[114] In Islamic State nationalist literature of the modern era, Sultan Mahmud campaign in the 11th century has been glorified as a historic "jihad against non-Muslims", his motive in destroying Somnath temple is described as "not driven by worldly gain [wealth]", but because he wanted to "end the worship of idols".