WhatsApp has sued the Indian government in a bid to block new rules it says would lead to "mass surveillance" by forcing social media platforms to hand over private information about their users. The company confirmed on Wednesday that such a complaint has been filed with the Delhi High Court. The lawsuit is an attempt to stave off strict rules that are supposed to take effect on Wednesday. They include demands that companies create special roles in India to keep them in compliance with local law, and to stay in contact with law enforcement 24/7. There are also requirements that services remove some types of content, including posts that feature "full or partial nudity." But the rule that WhatsApp most takes issue with is one that would require companies to trace the "first originator" of problematic messages or posts that go viral if asked by authorities — a demand that would effectively end any guarantee of user privacy by requiring the Facebook (FB)-owned platform to keep track of every message. "Requiring messaging apps to 'trace' chats is the equivalent of asking us to keep a fingerprint of every single message sent on WhatsApp, which would break end-to-end encryption and fundamentally undermines people's right to privacy," a company spokesperson said in a statement to CNN Business. "We have consistently joined civil society and experts around the world in opposing requirements that would violate the privacy of our users. " WhatsApp counts some 400 million users in India, its biggest market. It deployed end-to-end encryption in 2016 so that calls, messages, photos, videos and voice notes are only shared with the intended recipient and no one else — including WhatsApp. To comply with the traceability demand, WhatsApp would have to keep giant databases of every message, the company said. A government "that chooses to mandate traceability is effectively mandating a new form of mass surveillance," WhatsApp has written in a blog post about why it opposes the practice. "Traceability forces private companies to turn over the names of people who shared something even if they did not create it, shared it out of concern, or sent it to check its accuracy." WhatsApp began pushing back on India's demands to trace the source of messages years ago. In 2018, the government told WhatsApp to do more to trace the source of messages, after viral hoaxes on the platform were linked to several lynchings. The company said at the time that doing so would break its end-to-end encryption. The messaging service and other social media firms have lately faced an increasingly difficult environment in India — including the new regulations, which were announced in February just weeks after the government attempted to pressure Twitter (TWTR) to take down accounts it deemed incendiary. In April, Prime Minister Narendra Modi's government asked Facebook and Twitter (TWTR) to remove around 100 posts, including some that were critical of Modi's COVID-19 response. And earlier this week, Delhi police visited Twitter offices in India to order the social media giant to cooperate with an investigation into a tweet sent by a member of the ruling political party. Twitter had labeled the tweet as "manipulated media." — CNN