The Congress secured 43.90 per cent vote share as it wrested Himachal Pradesh from the Bharatiya Janata Party, winning 40 seats in the 68-member assembly in the hill state which maintained its tradition of voting the incumbent government out of power since 1985.
Despite getting 43 per cent vote share, the BJP could only manage to win 25 seats, with many segments witnessing lower victory margins.
Three Independents also emerged victorious in the assembly polls, results for which were declared on Thursday.
The vote share was up for the Congress as against previous assembly elections.
The BJP and the Congress contested on all the 68 constituencies, while the Aam Aadmi Party (AAP) fielded its candidates from 67 seats, the Bahujan Samaj Party (BSP) from 53 and the Communist Party of India-Marxist (CPI-M) from 11 seats.
AAP failed to open its account and the CPI-M also did not win any seat while its sitting MLA from Theog also lost.
AAP received 1.10 per cent votes, the CPI-M 0.66 per cent, the BSP 0.35 per cent, and Independents and others got 10.39 per cent, while 0.59 per cent went to NOTA.
The gap of less than one per cent between the Congress and BJP vote shares 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 "not the government but tradition will change", but failed to buck the trend. Himachal Pradesh has not voted any incumbent government back 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 the vote share of the top two parties".
In the 2017 state elections, the BJP had won 44 seats, the Congress 21, the CPI-M one and Independents two. The BJP had then got 48.8 per cent votes, the Congress 41.7 per cent, Independents 6.3 per cent and the CPI(M) had got 1.5 per cent, while NOTA attracted 0.9 per cent votes.
Congress leader Rahul Gandhi thanked the people of Himachal Pradesh for the "decisive win" of his party and assured them that every promise made by the party will be fulfilled.
Conceding defeat, Chief Minister Jairam Thakur said he respected the mandate of the people and submitted his resignation to the governor.
Governor Rajendra Vishwanath Arlekar has accepted his resignation.