The Malaysian government has pushed a law through Parliament that makes “fake news” punishable by a maximum six-year jail term following days of heated debate.

The Anti-Fake News Bill 2018, which sought to formulate a new law to stop the spread of fake news which could threaten the country’s political stability and undermine public order, was passed on Monday with 123 voting in favour and 64 against, the New Strait Times reported.

Several amendments were made to the Bill, including reducing the jail time for creating and spreading fake news from 10 years to six years and replacing the word “knowingly” to “maliciously”.

The Minister in Prime Minister Najib Razak’s Department, Azalina Othman said, said MPs from the opposition misled the public and had refused to listen to the explanations given by the government using various mediums.

“This law is not intended to restrict the freedom of speech, but to restrict the dissemination of fake news, as clearly mentioned in the explanatory statement of the Bill,” she said.

But opposition legislators criticised the law’s heavy penalties and its potential to limit free speech.

“This bill .. is a weapon to close the truth so that what is false can be upheld as true, and what is true can be reversed as false,” said Lim Guan Eng of the Democratic Action Party.

The new law has sparked widespread anger from activists, press freedom groups and the opposition who say it was aimed at cracking down on dissenting voices rather than safeguarding the public from false information.