India’s Bharatiya Janata Party (BJP) is all set to form the new government in Gujarat, the home state of Prime Minister Narendra Modi. While many in the ruling party will be content to retain power, there is a caveat: the victory has come at a huge cost and with a reduced margin.

Despite effectively using all their party machinery and paraphernalia, and with the prime minister and most of his cabinet colleagues camping in the state (Modi addressed more than 34 public rallies while Amit Shah, BJP president, spoke at more than 30 places during the high-octane campaign), most observers and TV pundits expected the party to do better.

Indeed the BJP’s victory, which came amid much resentment over Modi’s economic measures such as demonetisation and GST (Goods and Services Tax), should give some comfort to the party. There is also the personal appeal (especially in the urban middle class) that the prime minister continues to have, especially on his home turf. In rally after political rally, Modi likened himself to ‘son of the soil’ with most of the TV media calling the vote a mini referendum on the prime minister and his economic policies.

It would be safe to assume that while Modi retains formidable political charisma, his somewhat risky economic agenda has received a thumbs down from a large number of voters. The Congress party led by Rahul Gandhi, dismissed by the BJP as a lightweight and ineffectual force in Gujarat, will be pleased at the good showing that burnished the new party president’s stature.

The Gujarat verdict leaves the Hindu nationalist party in power in 19 (including Himachal Pradesh) of India’s 29 states, while Congress is governing in just four. Be that as it may, these elections marked a transitional point in Indian politics and would send the BJP back to the drawing board to maybe rethink some of its economic policies.

For the Congress, despite Modi’s efforts at populism and his bid to polarise the electorate towards the end of the campaign, the grand old party of India managed to overtake the BJP in most rural areas, reinforcing its stature as a viable opposition.

It will be a pyrrhic victory for the BJP because they have lost far too many seats, including Modi’s hometown. With several key states going to polls in 2018, and general elections scheduled for 2019, the race to shape the political destiny of India has begun.