NEW DELHI -- Twitter said on Wednesday that it has suspended a portion of Indian accounts after it was served with several separate blocking orders by India's Ministry of Electronics and Information Technology in the last 10 days related to massive farmer protests.

The social media company said in a blog post that the accounts will continue to be accessible outside India. None of the suspended accounts belonged to journalists, news organizations, activists and politicians, as doing so "would violate their fundamental right to free expression under Indian law," the company said.

The latest move comes after Twitter temporarily blocked hundreds of accounts, including those of news websites and activists last week. Online outrage ensued soon after, and the company subsequently restored access to these accounts, prompting the Indian government to serve it with a non-compliance notice.

The clampdown on Twitter accounts comes as thousands of farmers have hunkered down outside New Delhi for over two months in a strike against new agricultural laws they say will devastate their earnings. The government has said the laws will boost production through private investment. Critics say Prime Minister Narendra Modi's Bharatiya Janata Party has used the demonstrations to escalate a crackdown on free speech.

The largely peaceful rallies turned violent on Jan. 26 after a group of farmers veered from an agreed protest route and stormed New Delhi's 17th century Red Fort. Hundreds of police and farmers were injured in clashes.

In an order to Twitter last week, the government identified a number of accounts they say used provocative hashtags to spread misinformation on the protests as well as incite violence. The government invoked an IT law under which it has the power to direct online intermediaries and internet service providers to block certain content without providing any explanation. It threatened Twitter officials with a fine and imprisonment of up to seven years for violating its order.

Pawan Duggal, a cyberlaw expert and a Supreme Court lawyer, said the government's response to Twitter was a "19th century mindset to deal with a 21st century problem."

"India does not have a dedicated regulatory law on social media. This gives the government a legal position to use other information technology laws to regulate social media and initiate criminal action against those who violate its orders," said Duggal.

He said Twitter had the right to go to court, the "best remedy available to them at the moment."

In its statement on Wednesday, Twitter said it has taken steps to "reduce the visibility of the hashtags containing harmful content" by preventing them from trending on the platform. It also said it has acted against over 500 accounts, including permanently suspending some of them, for violating Twitter's rules.

"We will continue to maintain dialogue with the Indian government and respectfully engage with them," the company said.

But it appears Twitter's statement irked the government, which tweeted later on Wednesday that the company had earlier reached out to the IT ministry for a meeting. "In this light a blog post published prior to this engagement is unusual," the ministry said, adding the government will respond soon.

While India ranks second in the world in terms of mobile internet subscribers, the country leads in shutdowns used regularly to thwart popular protest movements, according to Top10VPN, a U.K.-based digital privacy and security research group.

These shutdowns have mainly targeted anti-government demonstrations, particularly against a discriminatory citizenship law in 2019 and the ongoing farmers' protests that have ratted the Modi administration. In some cases, the shutdowns have been justified by the ruling party leaders "in order to maintain public safety."

The government has proposed social media regulations that would give it more power to police online content.