The Congress on Thursday wrested Himachal Pradesh from the BJP winning 40 seats in the 68-member Assembly in the hill state which maintained its tradition of not voting any incumbent government to power since 1985.
According to the results declared by the Election Commission, the BJP won 25 seats, while eight state ministers including Suresh Bhardwaj, Ram Lal Markanda and Surveen Chaudhary lost.
The Independents won from three constituencies and the Aam Aadmi Party, which had contested from 67 seats, failed to open its account.
Congress president Mallikarjun Kharge hailed the people of Himachal Pradesh and his party leaders as the Congress secured a much-needed win, riding on anti-incumbency and a slew of poll promises including bringing back the old pension scheme and providing jobs to the youth and Rs 1500 to every woman.
Party leader Rahul Gandhi assured the people that every promise made by the Congress will be fulfilled.
The Congress has convened a meeting of all its newly-elected MLAs in Himachal Pradesh in Shimla on Friday and the meet is likely to pass a resolution authorising the Congress president to elect the CLP leader.
The Congress' vote share was 43.9 per cent and the BJP's was 43 per cent - a gap of less than one per cent which was highlighted by both Prime Minister Narendra Modi and BJP chief J P Nadda in their address to party workers in Delhi after the poll results were declared.
The BJP had given the slogan of "Raj nahin, riwaz badlega", which translates to "the convention will change, not the government", but failed to buck the trend. Himachal Pradesh has not voted any incumbent government to power since 1985.
Nadda thanked the BJP workers for their hard work in his home state Himachal Pradesh and asserted "raj may have changed, but 'riwaz' also changed as there was a gap of less than 1 per cent in vote share of the top two parties".
The BJP and the Congress contested on all 68 constituencies.
AAP, whose campaign had tapered after the initial phase, bagged 1.10 percent of votes. The CPI (M), which fought on eleven seats, also did not win any seat and its sitting MLA from Theog lost. It got 0.66 percent of votes, Independents and others got 10.39 percent while 0.59 percent of votes went to NOTA.
Outgoing Chief Minister Jai Ram Thakur said on many seats the victory margin was narrow. He said on nearly eleven to twelve seats, the winning margin was below 1,000 votes.
The lowest margin of 60 votes was registered by Suresh Kumar of Congress from Bhoranj seat.
Thakur defeated his nearest Congress rival Chet Ram by 38,183 votes from the former's Seraj seat in Mandi district. It was the highest victory margin in these elections.
"If you also see vote share, the difference (between Congress and BJP) is just about one percent. Despite that, Congress registered a win on many seats... But we respect the mandate," Thakur said before resigning.
"We will give constructive support rising above partisan politics but where we feel interests of the state are not being protected, we will raise the issues before people," he said and expressed the hope that the new Congress government will fulfil its election promises.
Governor Rajendra Vishwanath Arlekar has accepted his resignation, official sources said.
While the BJP was celebrating its stupendous victory in Gujarat, Prime Minister Modi also thanked the voters of the hill state for their affection and support to the party and said it will keep working to fulfil the aspirations of the state and raise people's issues.
Among the prominent winners and losers, Congress leaders and chief ministerial aspirants including Asha Kumari, Ram Lal Thakur and Kaul Singh suffered shock defeats.
Former Union minister Sukh Ram's son Anil Sharma of the BJP retained his Mandi Sadar seat defeating his rival from the Congress.
BJP candidate D S Thakur defeated six-time Congress MLA Asha Kumari in Dalhousie assembly seat by a margin of 9,918 votes. Asha Kumari was among the chief ministerial probables.
Hoshiyar Singh from Dehra and K L Thakur from Nalagarh are among the three Independents who won.
Former Himachal Pradesh chief minister Virbhadra Singh's son and sitting Congress MLA from Shimla (Rural) Vikramaditya Singh retained his seat by defeating his nearest rival Ravi Kumar Mehta of the BJP by 13,860 votes.
Of the 24 women who were in the fray, only BJP's Reena Kashyap won from Pachhad reserved seat.
The counting of votes for the 68-member assembly began at 8 am. For the Congress, a victory in Himachal Pradesh was needed for a revival as it has been battered by a spate of electoral losses in the last few years.
AICC in charge of Himachal Pradesh Rajeev Shukla said the party was happy that it is getting an opportunity to form the government in the state and asserted that it will do everything to fulfil the 10 guarantees made to the people of the state and would provide better governance to people.
Shukla said Priyanka Gandhi took the reins of the campaign in her hands and lauded her contribution. He also thanked Congress president Mallikarjun Kharge, former chiefs Sonia Gandhi and Rahul Gandhi and general secretary organisation K C Venugopal for their cooperation in poll preparations.
He said Rahul Gandhi's Bharat Jodo Yatra had also had an indirect impact on the elections and among the people.
While Shukla is AICC in charge of Himachal Pradesh, Chhattisgarh Chief Minister Bhupesh Baghel was appointed senior observer for the polls.
Himachal Pradesh Congress chief Pratibha Singh, the wife of late Chief Minister Virbhadra Singh, hailed the party's win in the assembly elections, saying the party MLAs will sit and decide on the chief ministerial pick.
Pratibha Singh is considered a key frontrunner for the chief minister's post, closely followed by former party chief Sukhwinder Singh Sukhu and outgoing CLP leader Mukesh Agnihotri.
The main opposition party had raised issues of price rise, unemployment, and the old pension scheme, among others.
The BJP's campaign in Himachal saw a special focus on women and youth, with the party rolling out a standalone manifesto for women for the first time in the state's history.