Vietnamese lawmakers approved a sweeping cyber security law which could compel Facebook and Google to take down critical posts within 24 hours, as space for debate is crushed inside the Communist country.
Activists and dissenters are routinely harassed, jailed or tied up in legal cases in Vietnam, a one-party state which is hyper-sensitive to critical public opinion.
Social media and Internet forums have provided a rare platform to share and debate views against authorities.
But the bill, waved through by an overwhelming majority of MPs in the National Assembly, is poised to end that relative freedom.
The law's far-reaching provisions mean internet companies will have to remove posts deemed to be a "national security" threat within a day and store personal information and data of their users inside Vietnam.
"Currently, Google and Facebook store personal data of Vietnamese users in Hong Kong and Singapore," Vo Trong Viet, chairman of National Assembly's defence and security committee told lawmakers.
"Putting data centres in Vietnam will increase expenses for the service providers... but it is necessary to meet the requirements of the country's cyber security."
The new law also outlaws material encouraging public gatherings or that "offends" everything from the national flag to the country's leaders and "heroes".
There was no immediate detail of the punishment for breaching the law.
Only 15 out of the 466 MPs present in the rubber-stamp assembly voted against the bill, which the government says will become law from January 1, 2019.
Rights advocates said the bill further shrinks the small space for debate.
"In the country's deeply repressive climate, the online space was a relative refuge where people could go to share ideas and opinions with less fear of censure by the authorities," said Clare Algar of Amnesty International.
"With the sweeping powers it grants the government to monitor online activity, this vote means there is now no safe place left."
The country's conservative leadership, which has been in charge since 2016, is waging a crackdown on activists and dissidents.
It has jailed scores of bloggers and dissidents for criticising the regime.
At least 26 dissidents and actives have been prosecuted during the first five months this year, according to Human Rights Watch.
The government has also unveiled a 10,000-strong brigade to fight cybercrimes and "wrongful views" on the internet, according to state media reports.
The unit, dubbed Force 47, is also tasked with fighting anti-state propaganda on the web.