Ajmer was founded by Ajayadeva, an 11th-century local Rajput ruler. It was shortly annexed by Delhi Sultanate in 1193, but returned to the local rulers, upon payment of tribute. Ajmer was also sacked by Mohammed Ghori in one of the many raids carried out by him on India. Sufi Saint Khwaja Moinuddin Chisti, the patron Saint of Ajmer, came here from Persia at the end of the 12th century. Ajmer became the part of the mighty Mughal Empire during the medieval period and was an important military center. Military campaigns against local Rajput rulers were initiated from Ajmer. Akbar built a fort here. The first contact between the Mughals and the British also happened in Ajmer, when Jahangir met Sir Thomas Roe in 1616. Shahjahan built marble pavilions around the Ana Sagar Lake in the 17th century. The Scindia rulers of Gwalior took over Ajmer, which was later taken over by the British in 1818. The British founded the famous Mayo College, a prestigious school here, in 1875.