The shrine proper of the Sun Temple was built during the reign of
Bhima I of
Chaulukya dynasty. Earlier, during 1024–1025,
Mahmud of Ghazni had invaded Bhima's kingdom, and a force of around 20,000 soldiers had unsuccessfully tried to check his advance at Modhera. Historian A. K. Majumdar theorizes that the Sun Temple might have been built to commemorate this defense. On a block in the western wall of the cella, there is an upside down inscription "
Vikram Samvat 1083" carelessly incised in
Devnagari script which corresponds to 1026-1027 CE. No other date is found. As the inscription is upside down, it evidences the destruction and reconstruction of the cella. Due to the position of the inscription, it is not firmly considered as the date of construction. On the stylistic ground, it is known that the
Kunda with its corner shrines was built earlier at the beginning of the 11th century. The inscription is considered as the date of destruction by Ghazni instead of the construction. Soon after Bhima had returned to power. So the temple proper, the miniature and the niche shrines in the tank were built shortly after 1026 CE. The dancing hall was added much later in the third quarter of the 12th century along with the gateways, the porch of the temple proper and the doorframes of the temple and the cella during the reign of the
Karna. The temple is built on 23.6° latitude (approximately near
Tropic of Cancer). The place was later known as
Sita ni Chauri and
Ramkund locally. No worship is offered here now. ==Architecture==