India's government clamped down on more than 850 pornographic websites over the weekend by asking Internet companies to block access, even as many users complained online and critics said that it was impossible to police the Internet.

"We have blocked 857 sites. Under the Indian law, we are duty-bound to examine and block Web sites that transmit content that violate morality and decency," said Ram Sewak Sharma, secretary of the ministry of communications and information technology.

According to the country's information technology law, publishers and transmitters of "material which is lascivious or appeals to the prurient interest or if its effect is such as to tend to deprave and corrupt persons" shall be punished with five to seven years of imprisonment and a cash fine. An older 1986 law also prohibits publishing content that contains "indecent representation of women."

Many Indians learned about the government action from a Reddit India thread on Sunday that said some porn sites were inaccessible.

"We are grateful to the government for enforcing the law because such sites are corrupting the minds and moral fibre of society and also leads to crime against women. It leads to social pollution,"said Vijay Panjwani, the lawyer who filed public interest litigation in the Supreme Court three years ago against Internet porn. "It is not practical for the government to stop viewers or actors of the pornographic content. That is why we have been saying 'block, block, block'. The easy access to online pornographic content must stop immediately."

The news portal Firstpost.com on Monday called it "a dangerous misstep towards hurting the freedom of the internet."

"Right now, there seems to be a 'ban first, debate later' policy and that can't be a good thing," Firstpost said.

India has the second largest population of Internet users in the world today, only trailing China in this regard. Over 500 million Indians are likely to use the internet by 2017, up from about 350 million today, according to a new report by the Internet and Mobile Association of India. The rapid growth of smartphones is fueling Internet use, say analysts.

Millions of Indians are accessing online porn on their smartphones or by inserting memory chips preloaded with racy videos that are cheaply available at street corner shops, reports say.

The Canada-born porn star Sunny Leone moved to India a few years ago and is now a mainstream Bollywood actor here. Seeking an image makeover, she stopped producing porn.

In 2012, three members of the legislative assembly in the southern state of Karnataka were caught watching a pornographic video on their smart phones. The politicians had to resign following widespread public outcry.

But this is not the first time the government has tried to block Internet content in India. In 2011, the Congress party government that preceded Modi had ordered Internet sites like Facebook, YouTube, Twitter and Google to screen and remove offensive content about religious figures and political leaders.

Lawyers say that while the government is legally empowered to block pornographic content, its effectiveness is questionable.

"We are going on a wild goose chase. We have to learn from other countries that have tried to block and have failed," said Pavan Duggal, a lawyer who specializes in cyber law and pornography. "You block ten sites today, 100 new sites will mushroom tomorrow, it is a very naïve move."

Last month, chief justice of the Supreme Court H. L. Dattu said that the court could not pass an order to stop an adult from watching porn privately. But the judge added that the issue was "definitely serious and some steps need to be taken" and said that the government is "expected to take a stand."

Some Internet companies have said that it is impossible to block everything because many of the servers that host these sites are outside India.

Some social commentators say that banning porn websites is a populist measure by Prime Minister Narendra Modi's government. Modi belongs to the Hindu nationalist Bharatiya Janata Party whose members often speak about preserving Indian cultural values. Other critics said that such a move is practically irreversible because no political party can afford to be seen to be demanding the restoration of these sites.

"Banning porn is an age old trick that many countries have tried. It will always find many supporters," said Mahesh Bhat, the Bollywood film maker who wrote the script for a movie that launched Leone as a lead actor three years ago. "But what is this idea of India that they are trying to promote? There are many Indias - one is where centuries-old erotic Hindu temples still exist with stone carvings of all kinds of sexual postures. These temples are celebrated as our heritage. The other is an India that became sexophobic after the Muslims and the Judeo-Christians rulers came here."