The fate of India Prime Minister Narendra Modi will be decided Thursday morning when the seven-phase national election ballots are counted in the country of 1.3 billion. The election for the world's largest democracy is widely seen as a referendum on Modi's five-year rule.

Exit polls show that Modi, who heads a government controlled by the Hindu nationalist Bharatiya Janata Party, will remain in power with between 277 and 365 seats in a 540-member lower house, the Lok Sabha. Modi needs 272 seats to claim the right to form the next federal government. India's markets are already celebrating, as the Sensex gained 3.75 percent and the Nifty jumped 3.7 percent Monday. Both indexes saw their biggest intra-day gains since Sept. 10, 2013. The rupee also rallied.

But exit polls have been wrong before and opposition parties, including the main Congress party, have banded together to raise a challenge to Modi.

During the campaign, opposition parties had accused Modi of whipping up religious and nationalistic feelings. Modi, a seasoned politician who had ruled the western state of Gujarat for 16 years before becoming the prime minister in 2014, dismissed such talk. He capped his campaign with a social media offensive, posting pictures of himself meditating in a cave near one of Hinduism's holiest shrines in the Himalayas. It was a clear message that emphasized his Hindutva credentials, aimed at both the voters and the opposition.

Modi has campaigned on a Hindu revival platform. The Indian Air Force's strike on terrorist camps in Pakistan-occupied Kashmir, following a terror attack that killed 44 paramilitary soldiers in the Indian part of Kashmir, is expected to have boosted his image as a leader who talks and acts tough. An aging Indian Air Force MiG 21 fighter was shot down during an air skirmish the following day with the Pakistan Air Force with the pilot taken prisoner, but he was soon returned and the incident largely passed without denting Modi's image. Rather Modi managed to turn the debate to the previous Congress government's negligence in acquiring modern fighter jets in time to keep the country's defense forces strong.

The many scams that erupted during the Congress rule before Modi, and that government's pusillanimous response to the terror attacks in Mumbai in 2011, which was beamed across the world by live television, added to the disenchantment with the Congress.

The Congress under Rahul Gandhi, scion of the Nehru-Gandhi family that has mostly ruled India since 1947, had raised corruption allegations against Modi over a deal to buy French-made Rafale fighter jets. However, if exit polls are accurate, those allegations have failed to stick with the people. That is also because Rahul's father Rajiv Gandhi, a former prime minister, was defeated in 1989 elections after corruption allegations stemming from the purchase of Bofors howitzer guns for the Indian army.

When Modi became the prime minister the Congress party was widely seen as running a hugely corrupt government that also catered to the country's sizeable Muslim minority population. The blood-stained history of Hindu-Muslim relations in the country, which culminated in the division of the subcontinent on religious lines by the British colonial rulers just before Independence — it was an event known as the Partition in which thousands of Hindus and Muslims were butchered and led to the biggest mass migration of people in modern human history — had created a long-running and deep mistrust of the Muslim community in India, which is roughly 80 percent Hindu.

Modi's message of Hindu pride resonated with the people who thought the Congress, which is run by Rahul's Italian-born mother Sonia Gandhi, was helping anti-Hindu organizations to strike roots in the country and denying Hindus what was their due.

GettyImages-PM Modi India
India's Prime Minister Narendra Modi gestures, during the 'Yoga for Peace' event in Buenos Aires, on November 29, 2018, on the eve of the G20 Leaders' Summit. MARTIN BERNETTI/AFP/Getty Images

Modi introduced many changes and reforms that helped India gain competitiveness as a business destination, like introducing a unified tax regime, scrapping archaic laws that made it difficult to do business and even championed a "Make in India" initiative to make the country a manufacturing powerhouse. India this year could become the world's fifth biggest economy, overtaking the United Kingdom, according to projections by the International Monetary Fund. The country has clocked an average annual growth rate of 7.5 percent during the five years Modi was in power.

But some of Modi's changes, like the demonetization of large denomination currency bills, led to economic hardships. He also is largely seen to have not delivered on the promise of bringing back the "black money" that corrupt politicians and businessmen are thought to have siphoned out of India in the last several decades.

Modi's early years were marked by an improving economy that was partly attributed to lower oil prices. But the economy in recent years has struggled and job creation has lagged. Perhaps more importantly, he is largely seen to have failed to act on the lynching of Muslims over the protection of cows which are considered sacred by Hindus.

Gujarat in 2002 had seen religious pogrom triggered by the burning of a train that killed about 60 Hindu pilgrims. In the communal conflagration that followed, more than a 1,000 people were killed -- about 800 Muslims and 260 Hindus. The opposition has tried to use this history against Modi but the Congress' own history of presiding over and even leading the 1984 anti-Sikh riots following the assassination of Rajeev's mother and then-prime minister Indira Gandhi by her Sikh bodyguards has served to blunt those allegations. It is estimated that 8,000-17,000 Sikhs were killed by mobs led by Congress leaders.

The exit polls indicated Modi's winning formula of appealing to Hindu pride still works. A victory for Modi and his party would alter the history of modern India in irrevocable ways and is expected to set the country's course permanently away from the heavily criticized secular political system that was introduced by an anglicized elite of Congress leaders under the influence of British colonialists.

And it may give Modi the confidence to carry through more reforms to further boost India's fast-growing economy. But if the exit polls are wrong, as many opposition politicians are saying, it will push the country into political uncertainty as none of the opposition parties are expected to gain a significant number of seats in the elections. Even if they do come together, the mutual contradictions and regional interests will make the government a house divided.

There are interesting parallels between Modi and U.S. President Donald Trump's rise to power. Both have exploited voters' grievances with existing political systems and leaders, while promising bold change. Both have managed to create profiles that are larger than that of their own political parties, and both are more than willing to challenge the status quo created by political correctness and cliques of politicians. And both hold the media in disdain.

In five years as India' prime minister, Modi only held one press conference — one in which he did not take questions.

Unnikrishnan Nair is an editor for International Business Times in Bangalore. The views and analysis expressed in this article are his own.