The BJP was leading in 103 seats in the 182-seat Gujarat legislature as of noon, according to early trends from the Election Commission. That's more than the 92 needed for a majority though this would be the BJP's lowest tally in more than two decades. The opposition Congress was ahead in 76 seats.
A narrower victory may prompt PM Modi to resort to populist spending to boost support before he faces re-election in early 2019. That risks widening India's already bloated budget deficit and pressure the battered bond market. The result could also embolden Congress leader Rahul Gandhi, who tapped into discontent against PM Modi's economic policies before as many as eight state elections over the next year.
"BJP will have to take some corrective measures in terms of the discontent on the ground but I don't know how far they will succeed in that," said Sudha Pai, who taught political studies at Jawaharlal Nehru University in New Delhi. These include the creation of jobs for the youth as well as better incomes for farmers, she said.
The BJP has held Gujarat for about two decades with PM Modi at the helm for more than 12 years. However, last year's ban on high-value currency notes and this year's chaotic roll out of the goods and services tax has hit traders and textile workers in Gujarat.
The Congress party, which had been written off earlier in the year, found its voice and attacked the administration as a "government for the rich."
"A few months ago, the market believed that the state election in Gujarat was a non-event with a foregone conclusion," analysts at CLSA led by Mumbai-based Mahesh Nandurkar wrote in a report on Thursday. "But the changes in the political scenario over the last few months have turned the election into an event."
India's main stock index -- which had slumped as much as 2.6 percent earlier Monday while the BJP was trailing -- recovered to gain 0.8 percent as it became clearer that the BJP would win a majority.
The BJP will also wrest Himachal Pradesh from the Congress, according to the Election Commission's early trends.