NEW DELHI – Twitter caught on when the Indian government last week called for the social media platform to delete hundreds of accounts criticizing the government for its behavior during protests by angry farmers.

On Wednesday, Twitter gave in under threat of prison for its employees on site.

The San Francisco-based company said it had permanently banned more than 500 accounts and removed an unspecified number of other accounts from India after the government accused them of making inflammatory remarks about Narendra Modi, the country’s prime minister . Twitter said it acted after the government posted a notice of non-compliance. According to experts, local company employees could be at risk of being imprisoned for up to seven years.

In a blog post published on Wednesday, Twitter said it had not taken any action on the accounts of media organizations, journalists, activists or politicians, and that it did not consider the order to block them “with the Indian Law is compatible “. It also said it is reviewing its options under local law and has requested a meeting with a senior government official.

“We continue to strive to ensure the health of the conversation taking place on Twitter,” it says, “and firmly believe that the tweets should flow.”

The brewing conflict in India is a particularly strong example of Twitter’s challenge to adhere to its self-proclaimed principles in support of free speech. The platform was caught up in an intense debate about the oversized role of social media in politics and the growing demand in many countries to tame this influence.

In the United States, Twitter took center stage last month after ex-President Donald J. Trump’s account was permanently banned for encouraging protests in Washington, DC that turned violent. In this case, it was exercising its right under US law that allows social platforms to monitor speeches about their services.

But in India, Twitter blocks accounts at the request of the government. The Indian government, controlled by Mr. Modi’s Bharatiya Janata Party, has become increasingly aggressive in suppressing dissent. She has arrested activists and journalists and pressured media organizations to stick to her line. It also cut off mobile Internet access in crisis areas.

Amid mounting rivalry with China, the Indian government has blocked a number of apps from Chinese companies, including TikTok, the short video-sharing network best known for its videos of teenagers and tweens dancing.

The government has also taken a tougher stance on its critics on social media. Under Indian law, Twitter’s Indian executives could face up to seven years’ imprisonment and a fine if the company considers government instructions to remove content it deems subversive or a threat to public order and national security , does not comply.

The country’s judiciary has increasingly joined the government and has brought Mr Modi a number of political victories, lawyers and human rights activists say. In November 2019, the Indian Supreme Court ruled in favor of the Hindus in a decade-long dispute over a holy site in Ayodhya, which was contested by Muslims. In addition, restrictions on the lifting of the Internet and movement in the disputed Jammu and Kashmir region have been moved to a government-run committee.

Digital rights groups say government pressure on Twitter amounts to censorship.

“The power used to ban smartphone apps is the same as the power used to tell Twitter to close accounts and order Internet shutdowns,” said Apar Gupta, executive director of the Internet Freedom Foundation.

With a population of 1.3 billion, India is a potentially huge growth market for global internet companies that is expanding internet access and is an emerging middle class. The government’s stronger hand in business complicates the prospects.

The country ranks fifth after Japan, Russia, South Korea and Turkey in terms of requests from Twitter to remove content, according to a transparency report from the company. The country sent nearly 5,500 legal claims, including court orders, to block content. Between January 2012 and June 2020, around 5,900 requests for access to users’ personal data were sent.

That involvement came to the fore last year when a prominent public interest attorney Prashant Bhushan tweeted criticizing the Indian Supreme Court’s role in eroding freedoms in the country. Twitter removed the tweets in question. Lawyers and advocates of digital rights said at the time that the company had set a dangerous legal standard. Twitter declined to comment on Wednesday, saying it removed Mr Bhushan’s tweets in accordance with legal requirements.

India’s protesting farmers have opened a new front in government efforts to tame social media.

Mr. Modi was embroiled in a month-long argument with the country’s farmers over his government’s market-friendly agricultural laws. Farmers, many from the state of Punjab in the northwest of the country, have settled in areas around the capital New Delhi. Protests turned violent in late January after farmers entered town – many with tractors – and clashed with police in some places.

Last week, Mr Modi’s government asked Twitter to remove over 1,000 additional accounts related to the protests. It has been alleged that many were led by sympathizers of the Khalistan movement overseas, an effort that had been more active over the past few decades, urging members of the Sikh religion to break up and start their own country. Some were backed by Pakistan, India’s arch-rivals, the government claimed.

Twitter initially banned some of the accounts last week, including the report from The Caravan, a narrative reporting magazine that covered the demonstrations at length. The accounts were then resumed after the government was informed that the content was deemed acceptable freedom of speech.

The behavior of the Indian government attracted worldwide attention last week when pop singer Rihanna retweeted an article about officials blocking internet access in parts of New Delhi during the peasant protests. Environmental activist Greta Thunberg also tweeted about the protests, sharing a link to a so-called toolkit that contained discussion items that supported the protesters and information on how to join forces with others with similar feelings. Mr. Modi’s supporters grabbed the link, saying it showed that outside forces were backing the farmers.

Also on Wednesday, the Indian government seemed to demonstrate to Twitter that the company needs the country more than the other way around. India’s Department of Electronics and Information Technology, the branch of government that pressured Twitter to remove material, published its response to Twitter’s blog post about a competing service in India called Koo.

A virtual meeting between Twitter executives and government officials was held on Wednesday evening.

Devdutta Mukhopadhyay, a lawyer working on freedom of speech in India, said Twitter is on a “delicate balance”.

“It’s a double bond for companies,” said Ms. Mukhopadhyay. “They want their services to be available in the country, but they also don’t want to participate in censorship that does not meet international human rights standards because it is arbitrary or disproportionate.”

She said Twitter should push back and “use its clout to show the same courage it had when it blocked Donald Trump’s account.”

“You shouldn’t let go of it just because it’s a developing country.”

Mujib Mashal contributed to the coverage.