Kenya's vibrant media and outspoken activists are up in arms over two recent parliamentary bills they say will curb hard-won freedoms, muzzle government critics and undermine democracy.
Last month, MPs pushed through a hugely controversial bill that could see journalists and outlets policed by a special quasi-government body and slapped with huge fines and potentially even forced out of business if they violate a code of conduct.
Parliament has also set its sights on NGOs, drawing up a law that would place them under de facto government management and, notably, restrict their ability to receive funds from overseas donors -- a key source of cash for many rights groups and anti-corruption watchdogs.
"There seems to be a calculated move to vilify, frustrate or muzzle the operations and voices of state and non-state actors involved in governance and accountability work in Kenya and the region at large," fumed Beryl Aidi of the Kenya Human Rights Commission.
"The cumulative effect is that they end up limiting the civic space," she said.
What exactly prompted parliament's actions is unclear, but Kenyan authorities have been at loggerheads with the media and civil society groups for much of this year.
In March, President Uhuru Kenyatta and his running mate William Ruto secured a narrow first-round election victory, and local pro-democracy groups were quick to cry foul and relay accusations of voting irregularities.
Kenyatta and Ruto are also facing crimes against humanity charges at the International Criminal Court in The Hague for allegedly masterminding ethnic unrest after disputed 2007 elections that left at least 1,100 dead and displaced hundreds of thousands.
Local human rights groups have since come under fire for helping the ICC, with some officials accusing them of "coaching" or manipulating witnesses to get them to testify against the country's leadership.
Kenyan lawmakers, meanwhile, have been the target of angry protests after they voted themselves big rises in their salaries -- already ranked among the highest in the world. In one demonstration, activists paraded a giant papier-mache pig doused in animal blood as part of a series of "greedy pig" protests.
Then came the attack on the Westgate shopping mall in September by Islamist gunmen, which saw Kenya's armed forces accused of helping themselves to cash, beer and electrical goods -- with security camera footage of the alleged looting being widely broadcast by the local media.
According to Sheila Muwanga Nabachwa, vice president of the International Federation for Human Rights (FIDH), the Kenyan parliament is signalling it has had enough.
"These two bills are a part of a government policy aimed at restricting the capacity to react for voices who are deemed too critical," she said.
Kenyan civil society, she added, has for several months endured "a campaign to stigmatise, degrade and weaken them".
Mwalimu Mati, a prominent anti-corruption activist, said Kenya's ruling elite betrayed an "insecurity about independent criticism and independent voices", and that the moves were evoking painful memories of Kenya's authoritarian past.
"It has happened before in Kenya history," he said, recalling that Kenya adopted a liberal constitution upon independence from Britain in 1963, only to see single-party rule ushered in by 1969 and the autocratic rule of Daniel arap Moi from 1978 to 2002.
Both President Kenyatta and Vice President Ruto are viewed as Moi's political heirs -- Kenyatta was designated as Moi's successor, while Ruto has taken his place as the leader of the Kalenjin community, one of Kenya's key tribes.
"It's a test of our institutions," said Mati, questioning whether parliament and the president -- if he chooses to endorse the bills -- will be challenged by the Supreme Court.
"The risk of a return to the old days should not be minimised," added the FIDH's Muwanga Nabachwa.
Kenyan NGOs and the media are fighting back, with rights groups launching an online petition and the media using their front pages to denounce the "draconian" measures.
The Daily Nation newspaper has said the media bill would put Kenya "in the same ranks with Zimbabwe, Cuba, Ethiopia and Kuwait" and set the country "firmly on the path of regression into the era of darkness".
Kenyatta and Ruto have distanced themselves from the storm, promising that the media bill will be sent back to parliament and the issues "ironed out".