Kenya's media has expressed outrage after parliament approved a bill imposing regulation on journalists.
In a late-night sitting on Thursday, MPs voted to set up a communications tribunal with the power to impose fines for breaching a code of conduct.
Media houses could face fines of $234,000 (£146,000), and individual journalists up to $12,000 (£7,000).
The bill still needs to be approved by President Uhuru Kenyatta before becoming law.
It comes a week after Kenya's top security chiefs warned journalists over their coverage of September's attack on the Westgate shopping centre by Islamist militants in which 67 people were killed.
CCTV footage was leaked to the local media which appeared to show soldiers taking items from a supermarket; the army said the soldiers were only taking water during the siege.
Two soldiers have since been sacked and jailed for looting but the army chief denied there had been "widespread looting" and said there had been an attempt by the media to paint the soldiers as "unprofessional".
'Democracy under attack'
The bill was debated for 30 minutes and voted on by 60 MPs in the 349-seat chamber, the BBC's Odhiambo Joseph reports from the capital, Nairobi.
The code of conduct is yet to be drafted - this will be done by the new tribunal, our reporter says.
It will have the power to seize property from media houses and journalists for the payment of fines.
The bill also stipulates that 45% of content on TV and radio - including advertising - must be locally produced.
There have been several other attempts by lawmakers to introduce new media regulation in Kenya; two years ago it caused such an uproar that in the end ex-President Mwai Kibaki refused to sign a bill into law.
The Kenyan media is currently regulated by the Media Council of Kenya, an independent body which has a complaints department that would be taken over by the new government-controlled communications tribunal.
Kenya's Daily Nation newspaper said the bill puts "Kenya among the likes of Zimbabwe, Cuba, Eritrea, Ethiopia, Iran and Kuwait where media freedom is curtailed".
A headline in the Standard newspaper read: "Democracy under attack".
Kiprono Kittony, the chairman of Kenya's Media Owners Association, said MPs were taking the country back to "the dark ages of media control", the Standard reports.
"The media in Kenya is seen as a leader in Africa but to create an authority that is government controlled to determine all matters of content and to impose draconian fines... with a possibility of deregistration for life is an attempt to muzzle the media," the paper quoted him as saying.
The managing director of the Capital Group, which owns the respected radio station Capital FM, said the new tribunal would "always be biased because it's an extension of the government," the AFP news agency reports.
The restrictions on content could also affect Kenya's place in the global economy, Cyrus Kamau said.
"I hope the president will listen to us, and we appeal to him to reject this bill and return it to the MPs," the agency quoted him as saying.