The Grand Alliance on Sunday celebrated all across Bihar as its candidates forged ahead in more than half of the 243 seats, stunning the Bharatiya Janata Party (BJP).
Two-and-a-half hours into the vote count, trends from counting centres showed the JD-U camp was ahead in 135 seats - 13 more than the 122 needed to secure a majority in the assembly - while the BJP alliance was on the front in 92 seats.
Smaller parties, including the BSP and MIM, were on the winning track in nine constituencies.
Chief Minister Nitish Kumar's Janata Dal-United (JD-U) leaders claimed victory and said the JD-U and its two allies - the RJD and Congress - were confident of forming the government.
JD-U leader Sharad Yadav said the Grand Alliance would win about 150 seats. "It was a very tough fight, it was a straight fight."
JD-U's Pavan Verma added: "The Grand Alliance has moved towards victory. It is a defeat for (Prime Minister Narendra) Modi and (BJP president) Amit Shah. We will form a government with a clear majority."
More From This Section
It was one of the most bitterly contested assembly election in recent times, with Modi personally taking charge of the BJP combine's campaign, pitting himself against Chief Minister and JD-U leader Nitish Kumar and RJD leader Lalu Prasad.
When the final results are declared, it would be the BJP's second straight defeat in assembly elections since it was routed by the Aam Aadmi Party in Delhi in February.
Early celebrations in the BJP office in New Delhi and Patna gave way to gloom as it became clear that the initial leads its candidates took proved to be a mirage, with the Grand Alliance members clawing back in the vote count.
"I congratulate the people of Bihar for voting for development. The credit goes to Modi's and (BJP president) Amit Shah's leadership," BJP spokesman Kailash Vijayvargiya told the media earlier.
Union Minister Ravi Shankar Prasad too said earlier: "We will win with very conclusive majority. People of Bihar need change."
BJP leaders ordered a huge quantity of sweets, saying they were sure of a victory. In no time, the atmosphere became sombre in the BJP office here.
BJP candidates were leading in 74 seats, former chief minister Jitan Ram Manjhi's Hindustani Awam Morcha (HAM) in four, the Lok Janshakti Party (LJP) of Ramvilas Paswan in nine and the Rashtriya Lok Sama Party (RLSP) in five seats each.
In the Grand Alliance, the JD-U was ahead in 64 seats, the RJD in 55 and the Congress in 12 seats. The RJD and the JD-U fielded 101 candidates each and the Congress 41.
The BJP contested 160 seats and its allies the LJP 40, the RLSP 23 and the HAM 20 seats.
The bitterly contested five-phase electoral battle began on October 12 and ended on November 5.