to Ujjain multiple times, and it appears that he spent at least a part of his life in Ujjain. Mrichchhakatika by Shudraka is also set in Ujjain. Ujjain also appears in several stories as the capital of the legendary emperor parmar Vikramaditya. Somadeva's Kathasaritsagara (11th century) mentions that the city was created by Vishwakarma, and describes it as invincible, prosperous and full of wonderful sights. Ujjain was sacked several times by the Arabs of the Umayyad Caliphate in the 8th century CE. The Arabs called the city Uzayn. Medieval period The Paramaras (9th-14th century CE) shifted the region's capital from Ujjain to Dhar. Mahmud of Ghazni sacked the city and forced it to pay tribute during his invasion in India. In 1235 CE, Iltutmish of Delhi Sultanate plundered the city. With the decline of the Paramara kingdom, Ujjain ultimately came under the Islamic rule, like other parts of north-central India. The city continued to be an important city of central India. As late as during the times of the Mughal vassal Jai Singh II (1688-1743), who constructed a Jantar Mantar in the city, Ujjain was the largest city and capital of the Malwa Subah. The city continued to be developed during Muslim rule especially under the Delhi Sultanate and the Mughal Empire, it was used as an important military headquarters. Modern period During the 18th century, the city briefly became the capital of Scindia state of the Maratha Empire, when Ranoji Scindia established his capital at Ujjain in 1731. Mahadji Scindia constructed a grand palace with a hundred rooms around which the Maratha sardars constructed their own mansions. Ruined and destroyed temples were restored and newer ones were built. But his successors moved to Gwalior, where they ruled the Gwalior State in the latter half of the 18th century. The struggle of supremacy between the Holkars of Indore and Scindias (who ruled Ujjain) led to rivalry between the merchants of the two cities. On 18 July 1801, the Holkars defeated the Scindias at the Battle of Ujjain. On 1 September, Yashwantrao Holkar entered the city, and demanded a sum of 15 lakh rupees from the city. He received only 1/8th of this amount; the rest was pocketed by his officers. A force sent by Daulatrao Scindia later regained control of Ujjain. After both Holkar and Scindias accepted the British suzerainty, the British colonial administrators decided to develop Indore as an