Nairobi (AFP) - Kenyan's opposition on Tuesday lodged a legal challenge in the High Court against a controversial new anti-terrorism law, arguing the east African nation was at risk of becoming a dictatorship.

The security bill was passed by parliament last week after a debate that sparked brawls between governing coalition and opposition MPs, and was signed into law by President Uhuru Kenyatta on Friday.

It hands Kenyan authorities sweeping powers to crack down on terror suspects -- including holding suspects for nearly a year without charge -- and threatens journalists with up to three years behind bars if their reports "undermine investigations or security operations relating to terrorism".

The government argues the measures are necessary to confront a wave of attacks by Somalia's Al Qaeda-affiliated Shebab insurgents, and that amendments giving the courts more oversight over the police and intelligence services make it constitutionally sound.

"We are saying that this law is invalid, that the provisions are inconsistent with the Constitution. It is null and void," lawyer and Senator James Orengo, representing the opposition Coalition for Reforms and Democracy (CORD), told High Court Justice Isaac Lenaola.

He also argued the law was passed in violation of parliamentary procedures, asking the court to "delay implementation of this unconstitutional law" pending a final decision on its legality.

"People are afraid, very afraid of the new laws, and it is easy to understand the fear. This is how dictatorship and collapse all begin," CORD leader Raila Odinga also said in a statement, promising a nationwide campaign aimed at "educating Kenyans" on the laws.

"We must not allow those plotting against our freedoms and rights to get away with this coup against the people and the constitution," he said.

During Tuesday High Court hearing, Justice Lenaola declined to immediately suspend the law, ruling that "the intent of the law is for the good of all Kenyans" and that therefore "a blanket order to suspend the law would be unfair."

Story continues

The Kenyan government has been under pressure to get tough on terrorism since 67 people were killed last year in a Shebab attack on the Westgate shopping mall in Nairobi.

Kenya's interior minister and police chief were also pushed out of their jobs earlier this month after the militants carried out two massacres in the northeast of the country.

The Shebab say the attacks are retaliation for Kenya's decision to send troops into Somalia in 2011 to fight the militants. Kenyan troops are now part of an African Union force battling the militants and supporting the war-torn country's internationally-backed government.