Lawmakers in jihadist-hit Burkina Faso on Friday adopted a controversial new law providing for jail terms of up to 10 years for divulging details of military operations.
The amendment bans the "publication of images of attacks against defence and security forces and the victims of terrorist crimes", as well as "attacks on the morale of troops engaged in the fight against terrorism," lawmaker Bernard Some said.
It was passed by 103 out of the 127 deputies present.
Some said the the measure was also aimed at preventing "terrorist propaganda."
Burkina Faso has suffered from increasingly frequent and deadly attacks attributed to a number of jihadist groups, including the Group to Support Islam and Muslims (GSIM) and Islamic State in the Greater Sahara.
The raids began in 2015 in the north before targeting the capital Ouagadougou and other regions, notably in the east.
Justice Minister Rene Bagoro said the new law also aimed to prevent the spread of information about "operations and strategic points of the defence and security forces."
The measure was criticised by opposition lawmakers as well as media and rights groups.
The general secretary of the Burkina Journalists' Association Guezouma Sanogo, denounced it as a bid to "regiment information about terrorist acts".
"A user of social media, a journalist or a defender of human rights can spend up to 10 years in prison solely because of spreading information linked to military operations," said Yves Boukari Traore, the executive director of Amnesty International Burkina Faso.
A joint statement by Amnesty and two local rights and bloggers' groups called the measure "liberticide".