Masjid-i-Ala (also called Jama Masjid) is a mosque located inside the Srirangapatna Fort in Srirangapatna in Mandya District in Karnataka. It was built during the regime of Tipu Sultan during 1786-87. The mosque is located close to the Bangalore Gate and has two minarets. The mosque is built over an elevated platform. In 1782, Tipu Sultan, the son of Hyder Ali, took the fort's reign and built fortifications. Tipu was invaded many times. Tipu Sultan built the mosque during 1786-87, close to his palace. After several unsuccessful attempts, British forces under Colonel Wellesly, attacked on 4 May 1799 under the covers. The forces had 2,494 British officers and 1 lakh Maratha cavalry. Had it not been to the treacherous ministers Poorniah and Mir Sadaq, Tipu would have repelled the invaders successfully. The treacherous ministers mixed dung and water in the gun powder Tipu was killed in the battle, and the English had a treaty with the Wodeyar queen. The mosque has two tall minarets, which are separated by three octagonal stages. There are galleried balconies that separate each stage of the minaret. There are turnip-shaped domes on the top of the minarets. There is a large rectangular prayer hall inside the mosque with a flat roof supported by foiled arches. There is a series of arched openings in the minarets and the walls of the rectangular terrace. The mosque has two stories, and unlike other mosques, it does not have a dome. There is an old clock installed during the early 20th century. A Madrasa is operated from the mosque, where learning of Islam is imparted.