Hanoi: Vietnam's National Assembly has passed a cyber security law requiring companies like Google and Facebook to store all data of Vietnam-based users in the country and open local offices.

The measure has drawn rare dissent from some lawmakers and government leaders as well as local tech groups, who sent a petition to the legislature that warned it would hurt the economy.

A Vietnamese national flag. Credit:Bloomberg

Demonstrators nationwide protested the bill on Sunday, saying it would limit free speech as the government could demand have access to the data.

"The cyber security law is a big backward step for Vietnam," Le Dang Doanh, a Hanoi-based economist and former government adviser said of the bill, which was passed by 87 per cent of lawmakers on Tuesday.