With additional reporting by Mohammed Wajihuddin in Mumbai

Shahid Raza Khan was in Class 2 when his cash-strapped parents shifted him from a private school to a village madrassa in Bihar's Gaya district. This year, the 27-year-old cracked the UPSC exams, securing 751st rank in his third attempt. "My brother, who is now a dentist, encouraged me to think about the civil services when I was 17. I had one general knowledge book at the madrassa, and my classmates would ask me why I was studying beyond my syllabus," says the PhD student in Delhi's JNU .With madrassas focusing on imparting a classic Islamic education, their students are often at a disadvantage when it comes to competitive exams. But now not only have madrassas in several states like UP modernised their curriculum, several non-profit coaching institutes are pitching in to help create tomorrow's doctors, engineers and civil servants.Khan, for instance, was coached for the civils at Delhi-based NGO Zakat Foundation of India. Zakat, which provides free and subsidized tuition, coached 18 of the 27 Muslim candidates who cleared civils this year.In Bidar, Karnataka, the Shaheen Group of Institutions has produced several doctors and engineers through its bridge course for madrassa-educated students in the last two decades.Traditionally, the majority of madrassa-going children are admitted in the Shoba-e-Hifz (department of Quran memorisation) and thousands become 'Hafiz' (one who has memorised the Quran). Shaheen Group's founder Abdul Qadeer says, "The Huffaz (plural of Hafiz) have every right to gain more knowledge and education after completing their course. In fact, in early and medieval period, Huffaz also served as hakeems or doctors. Shaheen institutions have a course that connects Huffaz with modern education." Called 'Hifz Plus', the foundation and bridge course equips students to enroll in Class 10 of a Shaheen college. Other than Bidar, Shaheen offers this course in Hassan in Karnataka and six other branches across the country.At 15, Hafiz Waheed Abdullah from Gorakhpur joined Shaheen after he read about the institute in a newspaper. He went on to get 579 marks in NEET and is now studying medicine at Aligarh Muslim University . Another madrassa product, Hafiza Rabia Basreen, studied at Bangalore Medical College and now works as a doctor in Hyderabad.Syed Zafar Mahmood, founder of the NGO Zakat Foundation, says their coaching centre for the civil services exam takes 65 aspirants every year - five-six of them are madrassa educated. "I see no difference in their abilities and performance and that of students from mainstream institutes. Entry into our institute is gained through an exam, so they are at similar levels," he says.Mahmood worked as an officer on the Sachar Committee report, which highlighted the socio-economic and educational backwardness of the Muslim community. Its findings prompted him to start the coaching centre. The lack of Muslim representation in fields like the civil services is a matter of concern, he says. This year, only 3.7% of those who made it were Muslims, he says. "Government data shows that Muslims are lagging behind, and there is only one place where they are larger in percentages - hospital queues. There is a lack of information, confidence and resources, and more affirmative action is needed to bridge the gap."One example is the Haj Committee's IAS and Allied Services Coaching and Guidance cell, started in 2009 at its headquarters, the Haj House in Mumbai. "After the Sachar report, which painted a very grim picture, the Haj Committee of India decided to start two-year residential coaching for Muslim students," says Mohammed Owais, its CEO. One of their successful students, Shaikh Mohammed Zaib (rank 225) who is from Ahmadnagar and whose father works at the district court says: "This was my fourth attempt and it is the Haj Committee which gave me a good foundation."Activist and former member of the Planning Commission Syeda Hameed says, " Madrassa students are very bright, but madrassas have begun to be regarded as breeding grounds for terrorism. This label has gotten stuck to these kids. The state needs to help modernize madrassas, as well as replicate the model of coaching institutes like Zakat on a larger scale."Unlike some madrassa students who study maths and science along with religious studies, Khan did not have the advantage of doing a concurrent course in modern subjects. "When I started studying for the civils, I didn't have that base. I would have trouble understanding class 3 mathematics, so it took me a lot of work to get to the same level as others before I even joined any coaching institute. Even learning English was a challenge, I would have difficulty reading English newspapers."But the rigour of the madrassa did help. "Learning the Quran taught me how to memorise and retain information. It also gave me a positive attitude towards life, but there are limitations," says Khan.Shahid T Komath of Kozhikode studied in a madrassa for 12 years, and even taught at a couple for two years. "There are gaps in knowledge, but we learn compassion, empathy and hope. I failed my prelims five times consecutively, but I had been taught to be patient, consistent and not be frustrated with failure," says the 30-year-old, who made it to the information services last year, and hopes to improve his UPSC rank by taking the exam again. His madrassa also encouraged them to join mainstream education simultaneously through open learning programmes. Komath has a BA in English literature.These success stories are inspiring many others in the community. Khan says his village has only five or six college graduates. "There are very few opportunities available to my community because of financial constraints, especially for women," he says. "After I've cleared the exam, people are filled with renewed hope for their kids' future. Many madrassa students are contacting me asking for advice. The myth that you can't even dream of such things has been broken."