“Because Pakistan does not have any law of data protection, international internet firms are reluctant to comply with the rules,” said Usama Khilji, director of Bolo Bhi, an internet rights organization based in Islamabad, the country’s capital.

The standoff over Pakistan’s digital censorship law, which would give regulators the power to demand the takedown of a wide range of content, is the latest skirmish in an escalating global battle. Facebook, Google and other big tech companies, which have long made their own rules about what is allowed on their services, are increasingly tangling with national governments seeking to curtail internet content that they consider harmful, distasteful or simply a threat to their power.

India is expected to unveil new censorship guidelines any day now, including a requirement that encrypted messaging services like WhatsApp tell the government how specific messages moved within their networks. The country has also proposed a new data privacy law that would restrict the activities of tech companies while exempting the government from privacy rules.

Vietnam passed its own cybersecurity law in 2018, with similar provisions to what Pakistan passed. Singapore recently began using its rules against “fake news” to go after critics and opposition figures by forcing social networks like Facebook to either take down certain posts or add the government’s response to them.

The unified resistance by Facebook, Google, Twitter and other tech companies in Pakistan is highly unusual. Companies often protest these types of regulations, but they rarely threaten to actually leave a country. Google pulled its search engine out of China in 2010 rather than submit to government censorship of search results, but LinkedIn agreed to self-censor its content when it entered China in 2014 and Apple acceded to Chinese demands to remove apps that customers had used to bypass the country’s Great Firewall.