Analysts say a big loss for prime minister’s ruling party could unite opposition ahead of elections next year.

India’s ruling Bharatiya Janata Party (BJP) looked set to lose power in three key states, official vote counts showed on Tuesday, likely handing Prime Minister Narendra Modi his biggest defeat since he took office in 2014, and only months ahead of a general election next year.

Analysts said a big loss for the BJP would signal rural dismay and help unite opposition to Modi, though his personal popularity remains high despite criticism that he was unable to deliver on promises to create jobs for young people and improve conditions for farmers.

The elections are also a test for Rahul Gandhi, the chief of the main opposition Congress party, who is trying to forge a broad alliance with regional groups to mount the most serious challenge to Modi yet in the election that must be held by May.

180923150942147

In the most populous state at stake, Madhya Pradesh, Congress is leading with 117 seats, against BJP’s 104 seats in the 230-seat state assembly, according to the Times of India count. A total of 116 votes is needed to achieve a majority.

“We’ve all voted for Congress this time and our candidate is winning here,” said Bishnu Prasad Jalodia, a wheat farmer in Madhya Pradesh.

“BJP ignored us farmers, they ignored those of us at the bottom of the pyramid.”

In the western state of Rajasthan, the Congress was leading with 101 seats of the 199-member assembly against the BJP’s 73, according to the same count.

In the central state of Chhattisgarh, Congress looks like a big winner, leading in 64 races against 17 of the BJP in the 90-seat regional assembly.

Meanwhile, in Telangana, the regional party Telangana Rashtra Samithi has crossed the 60-seat majority threshold, winning at least 87 seats in the 119-seat parliament.

Congress said it was confident of forming governments in all of the three big states, where it is leading in the count. The BJP has been ruling in all three.

The BJP said the state results would not necessarily dictate what happens in next year’s general election.

180526135103642

Investors said the BJP had not fared as badly as feared, and nationally it would still likely have an edge over an opposition coalition in the general election.

Markets recovered from sharp early losses, though the central bank governor’s resignation on Monday kept investors nervous.

Local issues usually dominate state polls, but politicians are seeing the elections as a pointer to the national vote just months away.

The Indian rupee, however, dropped as much as 1.5 percent to 72.465 rupees to the dollar.

Equity analysts had warned that Monday’s surprise resignation of Urjit Patel, the governor of the Reserve Bank of India, after a long tiff with the government, could send the markets crashing.

Gandhi, the fourth generation scion of the Nehru-Gandhi dynasty, has sought to build a coalition of regional groups, some headed by experienced firebrand, ambitious politicians.

“When one and one become eleven, even the mighty can be dethroned,” opposition leader Akhilesh Yadav said of the prospect of growing opposition unity.