The mosque was built by the Sharqi dynasty of the
Shia Jaunpur Sultanate in the 15th century. The dynasty was established by the powerful eunuch Malik Sarwar (also known as Malik-as-Sharq, meaning "peer of the east") in Jaunpur after the decline in
Tughlaq dynasty power, precipitated by both internal decline due to factors such as profligate spending by
Firuz Tughlaq and by the sack of
Delhi by
Timur in 1398. Malik-as-Sharq seized control of Jaunpur, a city founded in 1360 by Firuz Shah near a
Hindu town whose temples he desecrated, in 1394 and declared himself an independent
Sultan in 1398 after the sack of Delhi. The Jaunpur Sultanate controlled territory in the
Bihar and
Uttar Pradesh regions of India and was a cultural center of Islam, known as Shiraz-e-Hind (the
Shiraz of India), in India with its rulers being important patrons of the arts who created what is arguably distinctive style of architecture. The foundation of the mosque was laid in 1438 by Ibrahim Shah but the first steps of construction above ground level only began in 1440 with his death. The purpose for its construction is unknown but two prevalent stories are that Ibrahim Shah constructed the mosque to save a hermit from having to walk barefoot to a far off mosque or that he created it to boost employment during a famine. The complex was built in stages but was finally completed in 1473 by the final Sharqi Monarch Hussain Shah. After being at peace during the
Sayyid dynasty, the rise of the
Lodi dynasty in Delhi caused several wars between Hussain Shah Sharqi and both
Bahlul Lodi and
Sikandar Lodi, which led to the fall of the Jaunpur Sultanate to the Delhi Sultanate. In most sources, these wars cause
Sikandar Lodi to destroy or damage most of Hussain Shah's public works including the East Gate of the Jama Mosque, almost the entirety of the Jhanjri Mosque, and the majority of non-religious Sharqi buildings. In contrast to this view,
Ram Nath argues that Sikandar Lodi's status as a devout Muslim precluded him from damaging mosques and that the absence of non-religious buildings is due to their not having ever existed on account of Sharqi incompetence.
Under the British The Jama Mosque as well as other elements of Jaunpur's architecture were reinterpreted under
British rule. In 1783,
William Hodges made a sketch of the entrance of the mosque, published in his book
Select Views in India. Hodges was influenced by the
picturesque school of painters that focused on the importance of ruins and numerous paintings focused on ruins surrounded by nature. Within the Indian context this focus on ruins contributed to a portrayal of India as a civilization in decline. Michael S. Dodson argues that while the picturesque painters used this theme to speculate about the impermanence of the British Empire a latent aspect of the identification of India with ruin was the idea that the colonial government should take charge of restoration. This second idea gained in prominence as the colonial government carried out numerous surveys of India such as those of the Architectural Survey of India (ASI). The latter was carried out a detailed survey by Albert Führer on Jaunpur's architecture, including the Jama Mosque. This trend, according to Dodson, culminated in
George Curzon's passing of the
Ancient Monuments Preservation Act 1904 which included the Jama Mosque under its jurisdiction in 1919 but did not include other, less monumental works. At that time, there was no daytime
adhan in Jaunpur, it could only be heard with the rising and setting of the sun.
Karamat Ali Jaunpuri reformed this un-Islamic ritual and with great effort issued adhan in Jaunpur's mosques. There were also concerns behind the management of the historic Jama Mosque. Instead of adhan and prayers, this mosque was used for worldly gatherings like
baraat, clubbing and marriage ceremonies regardless oreligion. Cattle were also tied in some parts of the Jama Mosque. It continued for many years after until Jaunpuri managed to re-establish the five daily prayers at the mosque. Similarly, after Jama Masjid Jaunpur, he started a series of Friday sermons which continued for many years after his death. Due to his preaching efforts, attempts were made to kill him several times but he escaped due to his skill in martial arts. == Architecture ==