The ruling BJP was on Monday set to retain power in Gujarat, just edging past the half-way mark in one of the most bitterly contested elections that saw the Congress improve its tally compared to five years ago.
Election Commission officials said the Bharatiya Janata Party, on course for its sixth consecutive win, had bagged 99 seats while the Congress had won 80 seats.
Smaller parties and independents had won three seats and were leading in three.
While the BJP celebrated all across Gujarat and in Delhi, the 99-seat tally was far less than the 150 BJP President Amit Shah had set for the party to win and 16 less than what it got in 2012 despite intense campaigning by Prime Minister Narendra Modi. FOLLOW INDIATV'S FULL COVERAGE ON GUJARAT,HIMACHAL PRADESH RESULTS 2017
The Congress, its campaign led by its now President Rahul Gandhi, was poised to finish with a tally of 77, 16 more than what it bagged five years ago.
Outside Parliament, a beaming Modi flashed a V sign to celebrate the victory in his home state. Senior BJP leaders taunted Rahul Gandhi and said the result proved that the people had embraced the Gujarat model of development.
But the BJP's overall vote share in the state plunged from 60.11 per cent notched in the 2014 Lok Sabha polls to 49 per cent, indicating a sharp erosion in support base in a state which the party considers its fortress.
The vote share of the Congress, which joined hands with Patidar leader Hardik Patel, Dalit leader Jignesh Mevani and OBC leader Alpesh Thakore, soared from 33.45 per cent of 2014 to 41.5 per cent.
Union Information and Broadcasting Minister Smriti Irani brushed aside reports of BJP's waning support, saying the winner was always the king. "Jo jeeta wo hi Sikander."
As the vote count began across Gujarat at 8 a.m., at one point the Congress leads went past the BJP's, giving a scare to the ruling party and sending the stock markets plunging down.
The BJP, however, managed to recover lost ground and eventually went past the half-way mark of 92 seats needed to control the 182-member House.
Chief Minister Vijay Rupani (Rajkot West) and Deputy Chief Minister Nitin Patel (Mehsana) trailed to the Congress early in the day before bouncing back and winning. While Rupani won by 50,412 votes, Patel's victory margin was 7,951 votes.
The BJP also held on in most seats affected by the Patidar agitation demanding job quotas, provoking community leader Hardik Patel to complain about faulty Electronic Voting Machines.
While the BJP dominated over the Congress in South, Central and North Gujarat, the Congress held the upper hand in the sprawling Saurashtra/Kutch region.
The BJP also proved its sway over urban centres while the Congress seats came mostly from rural regions.
All Congress Chief Ministerial contenders lost -- Shaktisinh Gohil (Mandvi), Arjun Modhwadia (Bokhiria) and Siddharth Patel (Dabhoi).
But the BJP suffered a setback in Unjha constituency which includes Modi's hometown Vardana where he grew up.
The Gujarat election was held on December 9 and 14 and was marked by a viciousness that pitted Prime Minister Modi against the Congress, including his predecessor Manmohan Singh.
Modi had been the Gujarat Chief Minister from 2001 until he became the Prime Minister in 2014. It was the first Assembly election in Gujarat after Modi shifted to New Delhi.