Civil society in Egypt has been having a bad time recently. On May 27th, a long-awaited bill to reform a repressive 30-year-old law governing Egypt's 14,000 or so non-governmental organisations was rushed through parliament at short notice and turned out to be even more draconian than the original.
And earlier this month, just as activists began campaigning to try to convince President Hosni Mubarak not to ratify the bill, they discovered that he had quietly signed the controversial legislation several days earlier, turning it into law.
Under its terms, the state can, among other things, disband private groups working for democratisation, human rights, the environment and other causes that affect government policy or union activity in Egypt. It can also prevent them from receiving foreign funding and can even imprison members for vaguely worded offences.
International condemnation of the legislation has been widespread. A group of six international human rights groups, including Amnesty International and Human Rights Watch, has stated that it "restricts the right of freedom of association as guaranteed under the International Covenant on Civil and Political Rights". The US State Department was also critical. "This is the wrong direction to go if Egypt wants to energise civil society and promote development," its spokesman, Mr James Rubin, said.
Egyptian activists were more forthright. "The government can't have its cake and eat it too. Either they claim to be a democratic government and let us do our work or they arrest us and say they are not a democratic government," said Laila Soueif, who went on hunger strike to protest at the law.
Life has never been easy for non-governmental groups in Egypt. Until the most recent bill was passed, all private organisations were subject to the terms of a 1964 law that was a product of an attempt by the then-president, Gamal Abdul Nasser, to control and reshape society.
But they were also well aware that President Mubarak's government had become increasingly repressive in recent years, despite its ongoing economic liberalisation. The state's high-profile fight against Islamist violence since 1992 has been used to justify a steady tightening of its grip on power.
Examples are not difficult to find. A state of emergency imposed after the assassination of President Sadat in 1981 has been renewed regularly and remains in force today. Parliamentary elections in 1995 were subject to widespread electoral fraud, ensuring that the President's National Democratic Party enjoyed an overwhelming majority in the parliament.
Also in 1995, in a case with many similarities to the current NGO law, parliament hurriedly passed a series of measures that among other things imposed fines and jail sentences upon journalists found guilty of publishing hazily defined "false rumours", defamation or "mendacious information".
Although the worst terms of the law were eventually abrogated, the criminalisation of press offences remains on the books and journalists continue to be arrested for libel.
Given this background, it is perhaps not surprising that human rights organisations, which have been the most openly critical of the state's abuses of power, appear to have been a particular focus of the new legislation. During the debate in the parliament, one delegate described reports by human rights groups opposing the bill as "illegal publications that carry the fingerprints of suspected bodies working in the dark".
Such sentiments were echoed by the Prime Minister, Mr Kamal Ganzouri, who told MPs that his government would not "allow the associations to be another government in Egypt".
A more ominous sign of official disapproval was felt last December when one of Egypt's most prominent human rights activists, Hafez Abu Saada, was arrested after the Egyptian Organisation for Human Rights, which he heads, reported widespread torture and police brutality during a murder investigation in the Upper Egyptian village of Kosheh.
The incident received extensive international media coverage, embarrassing the government. Mr Abu Saada was later released but his imprisonment was widely seen as a signal to human rights workers. The official attitude was reinforced recently when charges were dropped against four of the police officers involved in the Kosheh incident. Instead, each of the four is to be given a reward for their good work.
Given all this it is perhaps not surprising that new law governing non-governmental organisations is less than democratic. Activists remain defiant and say that they will put pressure on President Mubarak to amend the legislation but few seem hopeful that it will have an immediate effect.
"We always knew it would be a long battle," added Gasser Abdel Razzek, of the Centre for Human Rights Legal Aid, one of the organisations opposing the law. "Now it is going to be that much harder."