The BJP, India’s main opposition party, was dogged by local infighting and a split among the leadership in the state.

Even a visit from Narendra Modi, the man many believe will be the BJP’s prime ministerial candidate in the upcoming national elections, could not reverse the party’s fortunes.

Advertisement

But Mr. Modi, who is chief minister of Gujarat, has played his hand well, according to analysts.

He didn’t campaign extensively in the state — he was there for just a day at the tail-end of the campaign — so is unlikely to be blamed for the expected defeat.

But Mr. Modi did show his face in three cities –Bangalore, Mangalore and Belgaum – demonstrating a willingness to help the party outside his own state, even in an election his party was unlikely to win.

“Mr. Modi has played it very smartly. It was clear [the] BJP wouldn’t win in Karnataka, so he limited his campaign in the state which absolves him of much of the blame,” said Narendra Kumar, head of the political science department at Babasaheb Bhimrao Ambedkar University in Lucknow, Uttar Pradesh.

He added that Mr. Modi seems to have learnt from Rahul Gandhi’s experience campaigning extensively in Bihar in 2010 and Uttar Pradesh in 2012.

The Congress party vice-president’s is still blamed for the his party’s defeat in those states and critics suggest it demonstrates Mr. Gandhi lacks national appeal.

But he also joined the Congress campaign in Karnataka and remains one of the front runners to be prime ministerial candidate if Congress win national elections, which must be held before May 2014.

His mother, Sonia Gandhi, the president of the Congress party also traveled to the southern state ahead of the elections Sunday.

Ravi Shankar Prasad, BJP spokesman, told television channel CNN- IBN that his party had lost in Karnataka, but Mr. Modi couldn’t have been “the deciding factor” because he had only addressed a few rallies.

Chandan Mitra, another BJP leader, told television channel NDTV that the party did not want to “overexpose Narendra Modi in an electoral battle so soon.”

According to the Election Commission of India, the BJP held on to Bangalore, where Mr. Modi addressed a rally on April 28, but was losing in Belgaum and Mangalore, where Mr. Modi also campaigned.

Mr. Kumar, said that although Mr. Modi wasn’t a factor in the Karnataka elections, he is likely to be much more influential in upcoming polls in the north of the country.

State elections in Madhya Pradesh and Chhattisgarh in central India, Rajasthan in the west and the capital Delhi will take place later this year, and would be an acid test for him, he added.

However, Mr. Modi’s ties with Hindu nationalist groups and suggestions he is unfit to rule a country as religiously diverse as India, could play against him in these areas, Mr. Kumar said.

Critics blame Mr. Modi for failing to stop communal riots in his state that killed over 1,000 people, most of them Muslims in 2002. Mr. Modi, who was chief minister at the time, has denied any wrongdoing.

In recent months Mr. Modi has becoming increasingly visible on the national stage. He has appeared on public forums addressing topics including women’s empowerment, the economy and the government and given speeches in cities such as Kolkata and Mumbai.

Elections were held in Karnataka on May 5 and at last count, the Congress party, which leads the ruling coalition, was ahead in 102 of the 224 seats on offer, while the BJP was ahead in only 37. In 2008 the party clinched 110 seats, the first time the BJP has won an outright majority in a southern state.

About India Real Time

India Real Time offers analysis and insights into the broad range of developments in business, markets, the economy, politics, culture, sports, and entertainment that take place every single day in the world’s largest democracy. Regular posts from Wall Street Journal and Dow Jones Newswires reporters around the country provide a unique take on the main stories in the news, shed light on what else mattered and why, and give global readers a snapshot of what Indians have been talking about all week. You can contact the editors at indiarealtime(at)wsj(dot)com.