Vietnam has introduced a new cybersecurity law, which criminalises criticising the government online and forces internet providers to give authorities’ user data when requested, sparking claims of a “totalitarian” crackdown on dissent.

The law, which mirrors China’s draconian internet rules, came into effect on 1 January and forces internet providers to censor content deemed “toxic” by the ruling communist government. Vietnam’s ministry of public security said it will tackle “hostile and reactionary forces”, but human rights groups said it was authorities’ latest method of silencing free speech.

The Vietnam government has intensified a crackdown on criticism since 2016, jailing dozens of dissidents. Spreading information deemed to be anti-government or anti-state online is now illegal in the country, as is using the internet to “post false information that could cause confusion and damage to socio-economic activities”.

Last week, the country’s Association of Journalists published a code of conduct banning reporters from posting information that could “run counter” to the state on social media. Daniel Bastard of Reporters Without Borders called the measures “a totalitarian model of information control”.

The government has asked Facebook and Google to open offices in Vietnam, and to agree to comply with the new censorship and user data rules. Hanoi claimed that Google has put steps in place to open a base in the country, although the search engine has not confirmed this. In response to the new law, Facebook said it would protect users’ rights and safety.

Phil Robertson, Human Rights Watch’s deputy Asia director, said the legislation was “the legal equivalent of a hammer to bash online critics, with overly broad provisions that can be easily used to classify almost any critical comment as criminal.”

He told the Guardian: “While it’s likely that activists who have previously spoken up against government abuses will be targeted first, the government’s longer-term plan is to bring the internet under the same draconian controls that affect print media, TV and radio. The government’s new year gift to its citizens is intensified fear about what they can say online, and uncertainty about what issues and statements will trigger arrests and prosecution.”