How should India approach its 172-million-strong Muslim minority, the second largest Muslim population in the world? Few questions matter more to the country’s future. Yet the odds of either major national party coming up with a sensible answer appear vanishingly small.

In a sense, Indian politics illustrates a larger global issue. As the Pakistani-Canadian atheist Ali Amjad Rizvi puts it, “The left is wrong on Islam. The right is wrong on Muslims.” I would phrase it differently in an Indian context: “Congress is wrong on Islam. BJP is wrong on Muslims.”

Let’s start with Congress, whose electoral woes can be traced, at least in part, to its having lost the confidence of a large chunk of India’s Hindu majority. Traditionally, Congress has been soft on Islamism, the attempt to order society by the religious rules laid down in sharia law. In the 1950s, Jawaharlal Nehru piloted deep reforms in Hindu society including the abolition of untouchability, the prohibition of polygamy and full property rights for widows. But Nehru baulked at extending the same modernising principle to Islamic law.

At the time, this oversight was somewhat explicable. In 1951, India housed only 35 million Muslims, or about 10% of the country’s population. A community shaken by Partition required reassurance that independent India would treat it humanely. Across the Muslim world, secularists appeared ascendant. Many scholars believed that it was only a matter of time before the regressive practices enshrined in sharia withered away. The rise of Islamist terrorism as a global concern was still decades away.

At the same time, however, the Congress approach to Muslims included a streak of cynical vote grubbing. Before Independence, the party’s position on Partition was aligned with Islamist groups, albeit for different reasons. (For instance, Jamaat-e-Islami founder Abul Ala Maududi opposed the creation of Pakistan out of a belief that all of India belonged to Islam). After 1947, Congress continued to truck with Islamists of various stripes. It effectively gave the Muslim community’s most orthodox elements a veto over progress.

This approach reached its nadir in 1986. That year Rajiv Gandhi rammed through a law to negate a Supreme Court judgment granting alimony to a 70-year-old Muslim divorcee named Shah Bano. Arguably no single act damaged Congress’s credibility with the Hindu middle class more than this naked pandering to retrograde sentiment. Two years later, India became the first country in the world to ban Salman Rushdie’s The Satanic Verses.

Over the years, the Congress habit of kowtowing to radicals has deepened to the point of parody. In 2010 party general secretary Digvijaya Singh helped launch a book that claimed that the Rashtriya Swayamsevak Sangh masterminded the 2008 Mumbai attacks. Last year, a video emerged showing Singh praising the hardline Wahhabi televangelist Zakir Naik, whose extreme views have led the United Kingdom and Canada to bar him from visiting.

Some of the party’s blunders can be traced to its hapless efforts to regain power in Uttar Pradesh. In 2012 then law minister Salman Khurshid claimed at an Azamgarh campaign rally that Sonia Gandhi had teared up over an encounter in Delhi’s Batla House with Indian Mujahideen terrorists. The party’s prominent candidates in this year’s state elections included Imran “Boti-Boti” Masood, who once threatened to chop Narendra Modi to pieces.

Nobody can accuse BJP of being soft on Islamism. The Supreme Court deserves credit for outlawing instant triple talaq, but the prime minister should nonetheless be applauded for publicly backing the brave Muslim women who waged a long and lonely legal battle against the practice. Among major Indian parties, only BJP unambiguously backs a uniform civil code.

The trouble with India’s ruling party is not that it opposes Islamism, but that its actions suggest a deep-rooted hostility towards Muslims. Take, for instance, the appointment in March of Yogi Adityanath as chief minister of Uttar Pradesh. Not long ago, Adityanath’s strident anti-Muslim rhetoric, and the violence associated with the militia he founded, Hindu Yuva Vahini, would have made him unfit for even a junior minister’s position in Delhi. Now he presides over a state with roughly as many people as Brazil.

Or take BJP’s obsession with restricting the beef industry (in India mostly buffalo), which employs Muslims in disproportionately large numbers. In a country with relatively few new employment opportunities, it takes a special brand of callousness to hurt the livelihoods of some of your poorest citizens merely because they happen not to share your religious taboos.

Or consider representation. The Modi government does not count a single Muslim in the Cabinet. It counts only two Muslims in the entire council of ministers. It’s almost as though the party thinks it can wish away more than one-eighth of India’s population the way some brilliant historians can wish away the fact that Akbar defeated Rana Pratap at the battle of Haldighati.

For an Indian secularist, the choices are bleak. The party that welcomes Muslims as fellow Indians also panders to Islamists. The party that opposes Islamists also makes many ordinary Muslims feel insecure. Neither party appears capable of a simple enough task – battling Islamists while embracing ordinary Muslims.