MANGALORE, INDIA (NYTIMES) - Waving a giant saffron flag, Mr Pranav Bhat last week joined a political rally for Prime Minister Narendra Modi and India's ruling party here in this sweltering port city on the south-west coast.

Milling on a vast field with his college buddies, Mr Bhat, 18, cheered for Mr Modi and his Hindu-oriented Bharatiya Janata Party (BJP), which was trying to wrest control of Karnataka state from the more secular Indian National Congress in legislative elections.

Yet the most intense political campaigning was not taking place on the streets. Instead, the action was happening on WhatsApp, a messaging service owned by Facebook that has about 250 million users in India.

Mr Bhat, a BJP youth leader, said he used WhatsApp to stay in constant touch with the 60 voters he was assigned to track for the party.

He sent them critiques of the state government, dark warnings about Hindus being murdered by Muslims - including a debunked BJP claim that 23 activists were killed by Islamists - and jokes ridiculing Congress leaders.

His own WhatsApp stream was full of election updates, pro-BJP videos, and false news stories, including a fake poll purportedly commissioned by the BBC that predicted a sweeping BJP win.

"Every minute, I'm getting a message," said Mr Bhat, a college student.

Related Story Indian political parties gear up for general elections

Related Story Voter card storm clouds key Indian state election

Facebook's WhatsApp is taking an increasingly central role in elections, especially in developing countries.

More than any other social media or messaging app, WhatsApp was used in recent months by India's political parties, religious activists and others to send messages and distribute news to Karnataka's 49 million voters.

While many messages were ordinary campaign missives, some were intended to inflame sectarian tensions and others were downright false, with no way to trace where they originated.

In the run-up to the May 12 vote in the state - the results of which are set to be announced Tuesday - the BJP and Congress parties claimed to have set up at least 50,000 WhatsApp groups between them to spread their messages.

At the same time, many others - their identities are unknown - distributed videos, audio clips, posts and false articles designed specifically to rile up the area's Hindu-Muslim fissures.

Right-wing Hindu groups employed WhatsApp to spread a grisly video that was described as an attack on a Hindu woman by a Muslim mob but was in fact a lynching in Guatemala.

One audio recording on the service from an unknown sender urged all Muslims in the state to vote for the Congress party "for the safety of our women and children".

Another WhatsApp message exhorted Hindus to vote for the BJP because "this is not just an election. This is a war of faiths."

Like the rest of India, Karnataka is a Hindu majority state. A staple of electoral politics here is pitting Muslims against Hindus, and various Hindu castes against each other.

Mr Ankit Lal, a top strategist for the Aam Aadmi Party, which fielded 28 candidates for Karnataka's 224 legislative seats, said WhatsApp has become the most important tool in digital campaigning.

"We wrestle on Twitter. The battle is on Facebook. The war is on WhatsApp," he said.

The role that WhatsApp plays in influencing voters has received far less attention than that of its sister services, Facebook and its photo-sharing platform, Instagram.

Both Facebook and Instagram have come under intense scrutiny in recent months for how Russian agents used them to manipulate US voters in the 2016 presidential election.

WhatsApp has largely escaped that notice because it is used more heavily outside the United States, with people in countries like India, Brazil and Indonesia sending a total of 60 billion messages a day.

And unlike Facebook and Instagram, where much of the activity is publicly visible online, WhatsApp's messages are generally hidden because it began as a person-to-person communication tool.

Yet WhatsApp has several features that make it a potential tinderbox for misinformation and misuse.

Users can remain anonymous, identified only by a phone number. Groups, which are capped at 256 members, are easy to set up by adding phone numbers of contacts.

People tend to belong to multiple groups, so they often get exposed to the same messages repeatedly. When messages are forwarded, there is no hint of where they originated.

And everything is encrypted, making it impossible for law enforcement officials or even WhatsApp to view what's being said without looking at the phone's screen.

Mr Govindraj Ethiraj, founder of Boom and IndiaSpend, two sites that fact-check Indian political and governmental claims, called WhatsApp "insidious" for its role in spreading false information.

"You're dealing with ghosts," he said.

Boom worked with Facebook during the Karnataka elections to flag fake news appearing on the social network.

Mr Mark Zuckerberg, Facebook's chief executive, has pledged to curb the abuse of Facebook and Instagram by people seeking to secretly influence elections. But he has said nothing about WhatsApp, which Facebook bought in 2014 for US$19 billion (S$25.38 billion).

WhatsApp officials said they are concerned about misuse of the platform, whose terms of service forbid hate speech, threats of violence and false statements.

A few weeks ago, its systems detected an attempt by someone in Karnataka to create dozens of groups very quickly using automation.

After some people reported getting spam from these groups, the company blocked them all. WhatsApp declined to say who it suspected was behind the group creation.

"We're working to give people more control over groups and are constantly evolving our tools to block automated content," WhatsApp said in a statement, adding that it was stepping up education on its safety features and how to spot fake news and hoaxes.

India's Congress party, which has ruled the country for most of the period since independence, has lost control of the central government and several key states but has held on to power in Karnataka.

If the BJP wins the state when votes are counted on Tuesday, it would give Mr Modi's party crucial momentum before India's 2019 national elections.

How much the WhatsApp barrage affected the final election results in Karnataka may never be clear.

While WhatsApp has largely replaced text messages and e-mail here, old-school campaign tactics such as rallies, television and newspaper coverage, door-to-door canvassing and outright vote-buying remain prevalent.

Mr Neelanjan Sircar, who was in Karnataka last week studying electoral behaviour for the Center for Policy Research in New Delhi, said the flood of WhatsApp messages probably did not change voters' political views.

But they did push emotional buttons and increase turnout in areas with strong caste or religious divisions.

"What it does do is get people out on the street," Mr Sircar said.

State officials said voter turnout was 72 per cent, the highest level since 1952.

Four years ago, during India's national parliamentary elections that swept Mr Modi to power, the primary digital tool was Facebook.

But as smartphone use in India has exploded over the past year-and-a-half, WhatsApp became the country's default communication mode - and the preferred medium for distributing campaign messages.

In state elections in Uttar Pradesh in early 2017, for example, the BJP created more than 6,000 WhatsApp groups to get its messages to every district and village. Its landslide victory there prompted the Congress party to mobilise its own WhatsApp army.

So when the time came to gear up for Karnataka's state elections, the parties turned to the same WhatsApp playbook.

"WhatsApp works like a nuclear chain reaction," said Mr Randeep Singh Surjewala, the Congress party's chief spokesman.

Mr U.T. Khader, an incumbent member of Karnataka's legislative assembly, experienced the WhatsApp effect firsthand.

Just before the election, Mr Khader, a Muslim in the Congress party, was the target of what Mangalore police said was a disturbing new type of WhatsApp attack: a series of profane audio messages purporting to be an escalating exchange of threats between Hindus and Muslims over his candidacy.

In one recording, which was supposedly a phone call between two Hindu political activists, one voice harangued the other for putting a saffron-colored shawl, which the BJP views as a Hindu symbol, around Mr Khader.

"Why did you put a saffron shawl on Khader? Do you love your life or not?" the first voice said. "If I shove a knife into you, do you think Khader will come to your support?"

Later messages sounded like they came from Muslims threatening to kill the first voice in response.

"Son of a prostitute, I'm warning you," said one. "I'll take you out."

The messages were sent to various WhatsApp groups, so they were heard by many voters.

Mr Khader, who has represented the area for more than a decade and won with a large margin last time, said the alleged conversations were fake and recorded in a studio.

He said WhatsApp has a social responsibility to stop such hate speech, but he also believed the negative messages backfired, increasing the support he got from his constituents, half of whom are Muslim.

And WhatsApp has been useful for his campaign in other ways.

"TV channels and newspapers largely tend to ignore me," Mr Khader said. "WhatsApp has helped me reach my supporters without the help of the mainstream media."

Mr Bhat, the college student and BJP youth leader, said WhatsApp has been effective for him as well.

After the polls closed on Saturday, he said the messages he shared with the 60 voters assigned to him had helped persuade 47 of them to vote for the BJP, including 13 who were previously uncommitted.

"I was successful in making them vote for BJP," he said.