(AFP) - Kenya's High Court suspended key parts of a controversial new national security law Friday that the opposition had warned risked turning the east African nation into a dictatorship.
High Court Judge George Odunga announced that eight sections of the new anti-terrorism law would be suspended because of human rights concerns.
The move follows a legal challenge by Kenya's opposition, with its leader Raila Odinga saying the ruling "marks a great day for Kenya".
Related: Kenya tells US to back off over 'terror' law
The security bill was passed by parliament last month after a chaotic debate marked by brawls between governing coalition and opposition MPs, and was signed into law by President Uhuru Kenyatta.
It hands Kenyan authorities sweeping powers, including the right to hold terror 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".
You may also like: Kenya's Tough Anti-Terror Law Signed
The eight clauses suspended by the High Court include the threat to imprison journalists if they publish "insulting, threatening, or inciting material or images of dead or injured persons which are likely to cause fear and alarm to the general public", or "any information which undermines investigations or security operations."
Also suspended is the right for the prosecution to withhold certain evidence and a 150,000 ceiling on the number of refugees allowed into Kenya -- which would have led to the expulsion of hundreds of thousands of refugees from Somalia, South Sudan, Sudan and other conflict-hit countries in the region.
New definitions on what constitutes inciting and aiding terrorism, as well as police surveillance powers, have also been shelved.
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.
The Kenyan government has been under pressure to get tough on terrorism since 67 people were killed in September 2013 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 last 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 part of an African Union force battling the militants and supporting the war-torn country's internationally-backed government.