Nairobi (AFP) - Kenya's High Court on Friday suspended key parts of a controversial new national security law pending a full examination of the legislation.

High Court Judge George Odunga announced that the application of eight sections of the new anti-terrorism law would be suspended because they raised concerns over human rights.

The move follows a legal challenge by Kenya's opposition, who had argued that the east African nation was at risk of becoming a dictatorship.

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

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 suspended clauses include the threat to journalists, a ceiling on the number of refugees allowed to be in Kenya, as well as definitions on what constitutes support for 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.