The Somali government's draft media legislation that proposes the suspension of journalists for work that undermines national security will make reporting even more difficult in a country where reporters are frequently threatened and even killed, journalists said Friday.

The law was approved by government ministers on Thursday, according to Abdullahi Elmoge, Somalia's information minister, who said some journalists had abused their freedoms. He said the country needs "a media law that guarantees the rights of everyone."

The draft law proposes a government watchdog agency and requires journalists to reveal anonymous sources if compelled by a court. It says that offending media houses can have their licenses revoked. The draft law also states that journalists can be suspended or fined for publishing work that undermines national peace and security.

Omar Faruk Osman of the National Union of Somali Journalists said the law was vague and could be abused in ways that undermine press freedom.

"We believe that this draft bill will lead to serious repression of media rights," he said.

Mohamed Bashir Hashi, an editor at Shabelle radio in the Somali capital, Mogadishu, said such legislation would force many independent journalists to become less critical of the government.

"It was largely written in favor of the government, not journalists," he said.

Lawmakers have to pass the bill before it can be signed into law by Somalia's president.

Somalia, which is slowly emerging from years of insurgency, is one of the most difficult places for journalists to work. At least 23 journalists have been killed there since 2012. The killings of media workers often happen in the government-controlled areas that journalists consider safe.

Despite the government's promises of prosecution of the alleged perpetrators, those responsible walk freely without facing justice. United Nations and African Union officials have decried the deaths and urged the Somali government to do more to end the killings.

Al-Shabab militants, warlords, criminals, and even government agents all could have reasons to see journalists killed in Somalia, one of the most corrupt and dangerous countries in the world.