Prime Minister Narendra Modi, center, in New Delhi on Tuesday. (Adnan Abidi/Reuters)

Narendra Modi, India’s most powerful prime minister in 30 years, is no longer invincible.

This week, Modi lost elections in three heartland states where his party, the ruling Bharatiya Janata Party (BJP), once enjoyed complete political domination. The defeats in Rajasthan, Madhya Pradesh and Chhattisgarh — which together send 65 representatives to India’s parliament (Modi’s party held 62 of these seats) — are a serious warning to the man who once seemed too strong to defeat. Tuesday’s results have now left the question of his reelection wide open.

In the months leading up to the state elections, Modi made bizarre mistakes that gave the opposition space to maneuver. Just a year ago, Modi was almost certain of a second term.

The provincial elections, which are seen as the semi-finals for national elections in May 2019, have also shut down the debate about whether the Congress Party’s Rahul Gandhi is a worthy challenger to Modi.

One of the biggest mistakes that Modi and the BJP have made is to mercilessly and obsessively mock Gandhi. After he was written off as incompetent, Gandhi went on to secure three wins on BJP turf. The right wing troll armies were left fumbling for words. The personal attacks on him and his family (in an election speech this month the prime minister obliquely referred to to Gandhi’s mother, the Italian-born Sonia Gandhi as a “vidhva” or a widow who was swindling money) appear to have backfired. Often taunted by Modi supporters as “Pappu” (a colloquialism for a slightly foolish and bumbling male), Gandhi must be credited for staying the course instead of withering under the obsessive criticism of the BJP. After these results (which coincidentally came on the day Gandhi completed one year as president of the Congress Party), he is no longer the joke. Instead, in 2018, he gets to have the last laugh.

Another big failing of the prime minister and his party is arrogance. Modi’s spectacular rise was at least in part because of his ferocious anti-elitism. He presented himself as an outsider to the power elite, a man of humble origins who had worked his way up without benefactors. This was an effective contrast against Gandhi, who inherited power (his great-grandfather, India’s first prime minister, was first among a long lineage of family members who governed India). But almost five years on, in an ironic reversal of perceptions, it is Modi and his influential aides who appear entitled. Gandhi, chastened by defeat, appears considerably more rooted and humble. Modi’s complacent, yet authoritarian image has been amplified by the government’s inability to allow independent thought. This has been most acutely manifested in the news media, whose promoters for the most part have balked at the thought of giving journalists space to criticize the government. The tightening of the mainstream media makes the electoral wins of the opposition that much more significant.

The government has also shown an embarrassing lack of respect for accomplished professionals and technocrats. Nowhere is this contempt more evident than in the country’s central bank. First, Raghuram Rajan, the brilliant governor of the Reserve Bank of India (RBI), who took the job on a sabbatical from the University of Chicago, was denied a second term. Rajan irked the government by being too outspoken on issues of social cohesion and why a good economy needed other freedoms to buttress it. Rajan was too much of his own person and his “visibility” was clearly a problem. His successor, Urji Patel, was the exact opposite in personality, low key and almost reclusive with the media. But he turned out to be even more unrelenting on following government diktats. Amid reports that the Modi government was pressuring the bank to part with its emergency reserves so that it could use the money to fund an election-friendly scheme before 2019, Patel put in his resignation papers this week (nine months before his tenure ended). He was the first RBI governor in 40 years to do so. And on the day of electoral defeat, in a display of tone-deafness, the choice for the bank’s governor was a bureaucrat who had been point-man for Modi’s most ill-conceived economic measure — demonetization.

Which brings us to the most disastrous decision Modi’s tenure. In November 2016, Modi personally announced the decision to take 86 percent of India’s cash out of circulation with the demonetization of 500- and 1,000-rupee notes. The severe costs of this unnecessary disruption are still being felt in an economy where 90 percent of all transactions (in volume) are in cash. In rural India and among small traders, the damage was especially intense. Combined with agrarian distress, the inability to create enough new jobs, clumsy implementation of a new tax scheme, and a contentious universal identification program — all mean that BJP is having to contend with some grave discontent among the more marginalized sections of Indian society.

There is a Hindi idiom: “Bhooka Pait Bhajan Nahin Hoth Gopala” which means “Lord I cannot sing to you on an empty stomach.” A right-wing supporter of the BJP reminded me of this to underline the mistake the BJP has made in falling back on Hindutva as a strategy to win elections. The party’s star campaigner (he addressed more rallies than Modi or party president Amit Shah) was the divisive, saffron clad monk, Yogi Adityanath. As chief minister of India’s most populous state, Adityanath has never bothered to hide his hatred for Muslims or his rank communal bigotry. The results prove that he did not pull in significant votes. In a year when Muslim cattle traders have been lynched by murderous mobs who use the cow (considered holy by millions of Hindus) as a pretext for majoritarian violence, Adityanath’s diminishing electoral returns are a serious warning to the BJP.

Narendra Modi is still the strongest political leader in India. But it’s time for him to step out of the echo-chamber.