1713 the Marathas conquered Saurashtra-Kathia-war as it was called. In 1783, Ahalya Bai,
the devout queen, found the ruins beyond repairs and installed Somanatha in a new temple a
little away from the old site. Somanatha still continues to be worshipped in the temple
which she built.
When the temple was converted into a
mosque, two, mosque domes were constructed, one over the gudha mandapa and the other over
the garbhagriha. The old Chalukyan pillars supporting the dome over the gudha mandapa were
converted into arches by crude artistic stone structures.