Singapore’s Parliament passed a bill preventing foreign entities or individuals from influencing politics in the country, amid criticism from the opposition and rights groups who said the new law gives the government sweeping powers to target dissent online.

The Foreign Interference (Countermeasures) bill gives officials the authority to order social media platforms like Facebook Inc. and internet service providers to disclose information behind harmful content they suspect may be carried out by foreign actors or entities.

The government has long defended the need for such laws, saying Singapore is especially vulnerable to fake news and hostile information campaigns given that it is a financial hub with a multiethnic, international population that enjoys widespread internet access.