A Kenyan court on Friday suspended parts of a controversial antiterrorism law that parliament passed last month in response to recent attacks by the al-Shabab terrorist group. High Court Judge George Odunga barred eight sections of the new law — which opposition groups say threatens democracy — from being implemented until further hearings could be held, according to the Associated Press.

“We cannot limit the freedoms and inalienable rights in the pretext of fighting terrorism, which must be done in the confines of the law,” Odunga said Friday, according to AP.

Al-Shabab militants from Somalia attacked a mall in Nairobi last year, killing 67 people. Last month, a string of attacks by the Islamist militants killed at least 60 Kenyans who were not Muslims, according to an AP report.

The Pentagon confirmed this week that U.S. airstrikes targeting al-Shabab militants in Somalia killed the group’s security chief. Al-Shabab pledged loyalty to the al Qaeda terrorist organization in 2012, according to Al Jazeera.

Politicians threw punches on the floor of Parliament while the antiterrorism law was being debated last month. It was signed into law by Kenyan President Uhurua Kenyatta on Dec. 19. The new law gives the government and its security agencies special powers to combat terrorism in addition to their standard authority on surveillance and investigation, The Jerusalem Post reported.

Odunga suspended controversial provisions of the new law — including the government’s ability to hold suspects without charge for up to 360 days rather than the original 90 days — until he sets up a three-man bench to determine its legality, according to AP. Critics of the law say these provisions endanger hard-won civil liberties set up in the country's 2010 constitution and echo dark times under former President Daniel Arap Moi, The Christian Science Monitor reported.

“This may be the government’s quick fix to insecurity, but I think there is no evidence it will prevent repeated terrorist attacks in the country,” Charles Otieno, a governance specialist from public safety organization The Usalama Reforms Forum, told the Christian Science Monitor last month.

During the Moi regime, thousands of Kenyans who opposed the government were arrested, tortured and detained without trial. Raila Odinga, a Kenyan politician and leader of the opposition Coalition for Reforms and Democracy party, told the Christian Science Monitor that the new antiterrorism law is a step away from democracy and back toward dictatorship. “The time has come for the people to stand up and say no,” said Odinga, who was detained in 1990 for supporting multiparty democracy, according to the Christian Science Monitor.