he has visited tirthas in Saurashtra, including Someshvara. Romila Thapar states that this does not imply the existence of a temple, but rather that it was a pilgrimage site (tirtha). The Chaulukya (Solanki) king Mularaja possibly built the first temple for Soma at the site sometime before 997 CE, even though some historians believe that he may have renovated a smaller earlier temple. The post-1950 excavations of the Somnath site have unearthed the earliest known version of the Somnath temple. The excavations showed the foundations of a 10th-century temple, notable broken parts and details of a major, well decorated version of a temple. Madhusudan Dhaky believes it to have been the one that was destroyed by Mahmud of Ghazni. B.K. Thapar, the archaeologist who did the excavation, stated that there was definitely a temple structure at Somnath-Patan in the 9th-century, but none before. In 1026, during the reign of Bhima I, the Turkic Muslim ruler Mahmud of Ghazni raided and plundered the Somnath temple, broke its jyotirlinga. He took away a booty of 20 million dinars. According to Romila Thapar, relying on a 1038 inscription of a Kadamba king of Goa, the condition of Somnath temple in 1026 after Ghazni's is unclear because the inscription is "puzzlingly silent" about Ghazni's raid or temple's condition. 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. The raid of 1026 by the Turkic Muslim ruler Mahmud of Ghazni is confirmed by the 11th-century Persian historian Al-Biruni, who worked in the court of Mahmud, who accompanied Mahmud's troops between 1017 and 1030 CE on some occasions, and who lived in the northwest Indian subcontinent region – over regular intervals, though not continuously. The invasion of Somnath site in 1026 CE is also confirmed by other Islamic historians such as Gardizi, Ibn Zafir and Ibn al-Athir. However, two Persian sources – one by adh-Dhahabi and other by al-Yafi'i – state it as 1027 CE, which is likely incorrect and late by a year, according to Khan – a scholar known for his studies on Al-Biruni and other Persian historians. According to Al-Biruni: Al-Biruni states that Mahmud destroyed the Somnath temple. He states Mahmud's motives as, "raids undertaken with a view to plunder and to satisfy the righteous iconoclasm