Kenya’s President Uhuru Kenyatta has signed into law a controversial security bill which saw MPs trade blows in parliament.
It was passed on Thursday during a chaotic parliamentary session, with opposition MPs warning that Kenya was becoming a “police state”.
The government has said it needs more powers to fight militant Islamists threatening Kenya’s security.
Somalia’s al-Qaeda-linked al-Shabab group has stepped up attaacks in Kenya.
The new anti-terror legislation requires journalists to obtain police permission before investigating or publishing stories on domestic terrorism and security issues.
It also stipulates that police must approve publication or broadcasting of information relating to investigations on terrorism.
“We must all remember that we are still at war and still vulnerable to terror attacks,” Mr Kenyatta said in a televised address, defending the law.
He denied that it infringed on civil liberties.
The BBC’s Dennis Okari in the capital, Nairobi, says the security bill has gone through various amendments.
The provision giving the security and intelligence agencies power to intercept phone conversations without a court order was dropped, he says.
Suspects in police custody will only be held for 24 hours and not 360 days as suggested in the original bill, unless a court order is issued.
Thursday’s special parliamentary sitting, which turned into mayhem live on television, shocked many Kenyans, our correspondent says.
Opposition MPs tore up papers and chanted anti-government slogans – there was a fist-fight and the deputy speaker had water poured over her.
The opposition, civil society groups and the media have all said they will go to court to challenge the legislation.