NEW DELHI-WhatsApp announced limits on Friday on the forwarding of messages by its 200 million Indian users in an effort to stop a spate of horrific lynchings and to assuage government threats of legal action in its biggest market.

More than 20 people have been butchered by crazed mobs in the past two months across India after being accused of child kidnapping and other crimes in viral messages circulated wildly on WhatsApp.

Late Thursday India's government, scrambling to find a response, threatened to take WhatsApp to court, saying the "medium" for spreading malicious rumours "cannot evade responsibility and accountability". "If (WhatsApp) remain mute spectators they are liable to be treated as abettors and thereafter face consequent legal action," the information technology ministry said.

The Facebook-owned firm responded on Friday with an announcement it will test limiting the ability to forward messages and cap at five the number of contacts or groups that messages can be forwarded to.

It addition, it said it will remove the "quick forward button" next to media messages, making sending on messages more cumbersome.

"We believe that these changes - which we'll continue to evaluate - will help keep WhatsApp the way it was designed to be: a private messaging app," a statement said.

Worldwide, the company will limit the number of forwards to 20 other groups, a spokesman said.

Under pressure from Prime Minister Narendra Modi's government, the firm had already announced new features to help users identify messages that have been forwarded.

It bought full-page adverts in Indian newspapers with tips on how to spot misinformation.

The ministry also called on WhatsApp to enable the "traceability" of messages when an official request is made.

But the platform on Friday said its messages would stay "end-to-end encrypted".

Lynchings are nothing new in India, but the spread of smartphones - there are a billion plus handsets, and data is cheap - to even the most remote corners has enabled rumours to be shared at lightning speed. In India people forward on WhatsApp more messages, photos, and videos, than any other country in the world, the company says.

The latest incident last Friday saw a 27-year-old software engineer beaten to death by a crowd of more than 2,000 people in the southern state of Karnataka after he and his friends offered chocolates to local children.