Islam and Jainism
Islam and Jainism interacted with each other in the Indian subcontinent following the frequent Islamic incursions, and later the Islamic conquest and rule of the subcontinent from twelfth century AD onwards, when much of northwest, north and central India came under the rule of the Delhi Sultanate, and later the Moghuls (Mughal people) of Turko-Mongol origin. Jainism and Islam have different theological premises, and their interaction has been mixed ranging from religious persecution to mutual acceptance. Jains faced persecution during and after the Muslim conquests on the Indian subcontinent. There were significant exceptions, such as Emperor Akbar (15421605) whose legendary religious tolerance, out of respect for Jains, ordered release of caged birds and banned killing of animals on the Jain festival of Paryusan. Jainism under Muslim rulers

Muslim conquerors and Jain institutions

The first mosque built in Delhi, the "Quwwat al-Islam" (near Qutb Minar) was built after the Jain temples built previously under the Tomara dynasty were forcefully converted into Mosques by the Muslim Sultanate. 27 Jain temples were demolished to build this mosque whose name translates to "might of Islam". The remains of the temple were used for to provide the building material for the mosque. Similarly the Jami Masjid at Khambhat was built on ruins of Jain temples. In the year 782, the city of Vallabhi, which was an important Jain center, was destroyed by Turkic rulers of Sindh. Mahmud Ghazni (1001), Mohammad Ghori (1175) and Ala-ud-din Muhammed Shah Khalji (1298) had an interesting relation the Jain community. The Shrine of Ibrahim at Bhadreshwar in Gujarat, built in 1160 AD was built before Islamic conquest. Mehrdad Shokoohy regards the Muslim monuments at Bhadreshwar to be the earliest Muslim monument in India based on archaeological evidence with architecture similar to the Jain temples of Mt Abu. Jainism in the Delhi Sultanate
Founders and rulers of Delhi Sultanate such as Mohammad Ghori (1175) and Alauddin Khalji (1298) had a known relation with the Jain community. Jinaprabha Suri (d.1333) writes in his "Vividhatirthakalpa" ("Guide to Various Pilgrimage Places") of his relationship with Muhammad bin Tughluq (r.1325-1351), Sultan of Delhi. In two chapters that discuss his relationship with the Sultan (one of which was actually written by his disciple), Jinaprabha travels to Delhi to recover an image that had been taken from a temple. After impressing the Sultan with his poetic flair and his thorough knowledge of the various religious and philosophical schools in India. In the second chapter, Jinaprabha is called back to Delhi to settle some religious matters for the Sultan. After getting the image back from the Sultan's treasury, Jinaprabha is paraded around the town on an elephant as a display of his pre-eminence in debate. He accompanies the Sultan on his military campaigns and upon his return is awarded a quarter of town in Tughluqabad for the Jain community, including a hall for Jinaprabha to teach in. Amid great fanfare and celebration the Jain community is declared by our author as prosperous and "just as when the Hindus ruled and times were not so bad, the glorious Jinaprabhasuri taught all those who come to him, even those of other faiths, and all rush to serve him." Jinaprabha also secured edicts (firmans) to allow Jains to go on pilgrimage unharmed and untaxed (ibid.). While temples were desecrated, Jinaprabha speaks of these incidents as due to the power of the Dark Age (Kali Yuga) in which such things are going to happen. He also speaks of these desecrations as opportunities to earn "endless merit" by restoring temples, which laymen did with gusto. In the Digambara tradition, the founding of the Bhattaraka tradition in its modern form (as an orange-robed monk), is often attributed to Prabhachandra of Mula Sangh, Balatkara Gana Saraswati gachchha, who travelled from Pattana (Gujarat) to Delhi, where he was anointed in a ceremony as  the first Bhattaraka of Delhi. He was invited by the ruler of Delhi, who is identified as Muhammad Bin Tughlaq. Jainism in the Mughal period
As bankers and financiers, the Jains had significant impact on Muslim rulers, but they rarely were able to enter into a political discourse which was framed in Islamic categories. Some Jain customs and characters that influenced the Mughal court of Akbar have been documented. Akbar honored Hiravijaya, the leader of the Svetambara Tapa Gaccha. They persuaded the emperor to forbid the slaughter of animals for six months in Gujarat and abolish the confiscation of property of deceased persons, the Sujija Tax (jizya) and a Sulka (possibly a tax on pilgrims) and free caged birds and prisoners. Akbar is said to have given up hunting and quit meat-eating forever as it had become repulsive. Akbar also declared "Amari Ghosana" banning the killing of animals during Jain festival of Paryushana and Mahavir Janma Kalyanak. He rolled back the jizya from Jain pilgrimage places like Palitana. These farmans were also issued in 1592, 1594 and 1598. Jain monks gained the respect of the Mughal emperors Jahangir and Shah Jahan. Akbar banned animal slaughter near important Jain sites during the Paryushana. In 1645, the Mughal prince Aurangzeb, after being appointed the Governor of Gujarat, ordered the slaughter a cow inside the Chintamani Parshvanath Jain temple constructed by the Jain jeweller and banker Shantidas Jhaveri, according to the French traveller Jean de Thévenot (1666). Aurangzeb then caused the desecration of the noses of all carved figures in the temple, and then converted the place into a mosque called Quvval-ul-Islam ("the Might of Islam"). Shantidas likely complained to Aurangzeb's father emperor Shah Jahan. Few years later, in 1648, Shah Jahan issued a firman declaring that a wall be constructed between the mihrabs to separate the Muslim area and Jain area, and Jain part be handed back to Shantidas so that Jains can worship in that part. The firman also declared that the Muslim fakirs housed in the building be removed, and the materials carried away from the temple should be restored. However, Shantidas and the Jain community removed the principal images from the desecrated building and installed them in other Jain temples, did not attempt to restore it and the temple disappeared for all practical purposes. Similarities 
Both Jainism and Islam place value on ritual fasting. The ascetic practices and festive occasions in Jainism involve fasting. In Islam, Sawm (Muslim Fasting for Ramadan) is a month long mandatory ritual fasting by Muslims. One major difference is that during Sawm fasts in Islam, fasting is limited to daylight hours, and Muslims break their fast after sunset. In Jain fasting fasting continues during day and night, and Jains break their fast 48 minutes after the sunrise of the day when fast ends. Another difference is that Jain practice is optional and set by the preferences of the Jain any time of the year. In contrast, the month long fasting in Islam is a part of the mandatory five pillars of Islam practice that is set by the Islamic calendar. Differences

Creator god
Jains, unlike Muslims, do not believe in a creator God. Jainism believed that an individual soul will attain moksha with intense meditation, self discipline and sacrifice of even food and water to attain Moksa which is state of free from cycle of birth and karma, that soul will merge with nature and ultimate peace and eternity against time and space. Theology
There is neither eternal heaven nor eternal hell nor judgement day in Jainism, unlike Islam.They believe only karma can help a person
 Jainism accepts numerous deities (gods and goddesses) that are a part of the cycles of rebirth, while Islam is strictly monotheistic. Animal rights and food
The non-violence doctrine of Jainism has encouraged a strict vegetarian Jain culture. Islam teaches that meat is a gift of God, such as in verses 6:141-142 of the Quran. Muslims are generally non-vegetarians, and only consume halal meat. They strictly avoid consuming pork and alcohol. Jains oppose any slaughter of animals. Muslims ritually perform large scale slaughter of animals for meat, such as on the festival of Eid al-Adha but also forbid harming of any animal whatsoever. Judgement day versus cyclic rebirth
Islamic scriptures reject any idea of reincarnation of human beings or God. It teaches a linear concept of life, wherein a human being has only one life and upon death is judged by God, then rewarded in heaven or punished in hell. Islam teaches final resurrection and Judgement Day, but there is no prospect of reincarnation of a human being into a different body or being. In contrast, the reincarnation (rebirth) doctrine, along with its theories of Saṃsāra and Karma, are central to Jain theological foundations, as evidenced by the extensive literature on it in the major sects of Jainism, and their ideas on these topics from the earliest times of the Jaina tradition. Reincarnation in contemporary Jainism traditions is the belief that the worldly life is characterized by continuous rebirths and suffering in various realms of existence, and that a spiritual and ethical life is a means to end suffering and rebirths. Asceticism and monasticism
Asceticism is celebrated and a major part of Jain theology and salvation process. Mainstream Islam has lacked asceticism, except for its minority Sufi sect. Monasticism is cherished in Jainism. Monasticism is forbidden in Islam. Apostasy
Apostasy, that is abandonment of Islam by a Muslim and conversion to another religion or atheism, is a religious crime in Islamic jurisprudence punishable by death. The Quran promises dire consequences in the afterlife to those who "turn from", "renounce" or "disbelieve after having believed". According to the Hadiths, states John Esposito, leaving Islam is punishable by "beheading,  crucifixion or banishment", and Sharia (Islamic legal code) traditionally has required death by the sword for an adult sane male who voluntarily leaves Islam. However, adds Esposito, modern thinkers have argued against execution as penalty for apostasy from Islam by invoking Quranic verse 2:257. Jainism allows freedom of conscience and apostasy. Conversions of Jains to other religions, and the marriage of a Hindu king and Jain queen wherein each continued to follow their religion, and build temples of both religions, has been documented in Jain history. In some Digambara Jain writings, the Buddha is presented as someone who joined Mahavira's Jain sangha, but became an apostate and started his own religion now called Buddhism. This historic interaction is confirmed by early Buddhist texts wherein the Mahavira is called as Nigantha Nataputta. 