Kenya's President Uhuru Kenyatta has signed into law a contested security bill, saying it would help fight armed groups operating in the East African country.
Kenyatta on Friday scolded Kenyan politicians who were involved in a brawl in parliament on Thursday during a vote on the controversial bill.
He also urged Kenyans to read the new law, which gives authorities sweeping powers to crack down on "terror suspects" and curtail press freedoms.
The law has come under criticism from human rights groups and nine western countries for its alleged infringement of democratic freedoms.
The United States, Britain, Germany and France warned of the law's impact on Wednesday, in a rare collective statement.
"It is important that the legislation, while strengthening security, respects human rights and international obligations," they said.
"Protecting Kenya's constitution and upholding civil liberties and democracy are among the most effective ways to bolster security," the statement said.
The controversial measures extend the time police can hold "terror suspects" from the current 90 days to nearly a year, increase sentences and give more powers to tap phones.
Journalists could face up to three years behind bars if their reports "undermine investigations or security operations relating to terrorism," or if they publish images of "terror victims" without permission from the police.
"This is a serious assault on the freedoms that Kenyans are enjoying today. We believe that the amendments are just a way of sugarcoating the bill," said opposition coalition leader Moses Wetangula, referring to minor changes made to the bill.
The government argues the measures are necessary to confront armed groups, but rights groups and the opposition say they are an assault on basic freedoms.
As part of an ongoing security crackdown prompted by recent attacks by al-Shabab fighters, Kenya on Tuesday closed over 500 non-governmental organisations, including 15 for alleged "fundraising for terrorism".
Divisions over the legislation also triggered heated exchanges between politicians that culminated in a brawl, forcing the vote to be repeatedly delayed on Thursday.
It was finally approved to loud boos from opposition MPs, who bombarded Speaker of Parliament Justin Muturi with books and documents.
Civil action groups have already vowed to challenge the law to have it annulled.