Puri is known by several names since the ancient times, and was locally known as "Sri Kshetra" and Lord Jagannatha temple is known as "Badadeula". Puri and the Jagannatha Temple were invaded 18 times by Muslim rulers, from the 7th century AD till the early 19th century with the objective of looting the treasures of the temple. Odisha, including Puri and its temple, were part of British India from 1803 till India attained independence in August 1947. Even though princely states do not exist in India today, the heirs of the Gajapati Dynasty of Khurda still perform the ritual duties of the temple. The temple town has many Hindu religious mathas or monasteries. The Sun Temple was built in the 13th century and designed as a gigantic chariot of the Sun God, Surya, with twelve pairs of ornamented wheels pulled by seven horses. Some of the wheels are 3 metres wide. Only six of the seven horse still stand today. The temple fell into disuse after an envoy of Jahangir desecrated the temple in the early 17th century. According to folklore, there was a diamond in the centre of the idol which reflected the sun rays that passed. In 1627, the then Raja of Khurda took the Sun idol from Konark to the Jagannath temple in Puri. The Sun temple belongs to the Kalingan school of Indian temple architecture. The alignment of the Sun Temple is along the east–west direction. The inner sanctum or vimana used to be surmounted by a tower or shikara but it was razed in the 19th century. The audience hall or jagamohana still stands and comprises majority of the ruins. The roof of the dance hall or natmandir has fallen off. It stands at the eastern end of the ruins on a raised platform.