The Indian government on Friday threw its weight behind a case against internet giants including Google and Facebook, who are embroiled in a battle over offensive content after a judge warned websites may be blocked like in China.

The case, which has stoked worries about freedom of speech in the world's largest democracy, was brought by a private petitioner seeking to remove images considered offensive to Hindus, Muslims and Christians from websites.

The government on Friday officially sanctioned prosecuting 21 companies including Google and Facebook.

The government of India...finds it appropriate to grant sanction...to proceed against the accused persons in the aforesaid complaint in national harmony, integration and national interest, a court document seen by Reuters said.

The next hearing was set for March and senior executives could be summoned, local media said.

Separately, the Delhi High Court is due to resume a hearing on Monday of an appeal against the case, which was originally brought in a lower court.

The lower court gave a ruling asking the companies to take down some content, we appealed that ruling and it is in the higher court, said a Google spokesman in India on Friday.

The India units of Facebook, Yahoo! Inc and Microsoft Corp declined to comment.

If a contraband is found in your house, it (is) your liability to take action against it, High Court Justice Suresh Kait told lawyers from Facebook India and Google India on Thursday, according to the Economic Times newspaper.

Like China, we can block all such websites (that don't comply). But let us not go to that situation.

A law passed last year in India makes companies responsible for user content posted on their websites, requiring them to take it down within 36 hours in case of a complaint. The lower court affirmed the law last week.

Less than 10 percent of India's 1.2 billion people have Internet access, though the connected population is rapidly growing through social media tools on mobile phones, bringing many into contact for the first time with images intended to offend.

More than 880 million people have mobile phones in India, but more expensive Internet-capable 3G models are out of reach for many.

Civil rights groups opposed the laws, but politicians say that posting offensive images in the socially conservative country with a history of violence between religious groups presents a danger to the public as Internet use grows.

In December, Telecoms Minister Kapil Sibal weighed into the debate, urging Facebook, Twitter, Google and others to remove offensive material.

Despite rules to remove offensive content, India's Internet access is still largely free when compared with the tight controls in fellow Asian economic powerhouse China.

(Addtional reporting by Devidutta Tripathy; Editing by Matthias Williams and Ed Lane)