This article is more than 8 years old

This article is more than 8 years old

The editor of an independent Egyptian daily has been released from jail, just hours after the country's Islamist president issued a law that bans the imprisonment of journalists accused of media-related offences.

The case against Islam Afifi sparked an outcry from journalists and intellectuals, who viewed the lawsuit as an attack on free speech similar to the sort of legal manoeuvring used by the former regime of Hosni Mubarak, ousted in last year's popular uprising, to silence its opponents.

Afifi, who is the editor-in-chief of al-Dustour newspaper owned by the leader of the opposition Wafd party, had been charged with insulting the president and harming public interest with inflammatory articles. He was also banned from travelling abroad.

A Cairo court on Thursday ordered Afifi to remain in jail pending trial in September. Hours after the court's decision, President Mohamed Morsi issued a law that bans imprisoning journalists for media-related charges until court verdicts are handed down.

Afifi, who still faces trial, was photographed smiling and being greeted by newspaper staff after his release.

The decree affecting those awaiting trial for offences such as libel, defamation and slander is the first law Morsi has issued since assuming legislative powers earlier this month in the absence of a parliament, and following a decision to retire a cadre of generals with whom he had shared powers.

Morsi, who is a member of Egypt's powerful Muslim Brotherhood, became the country's first freely elected civilian president in late June.

Since Morsi took office, al-Dustour has regularly published articles warning of alleged Brotherhood plots and conspiracies to turn Egypt into a fundamentalist Islamic state. It also promoted an anti-Brotherhood demonstration on Friday, initially calling for the torching of Brotherhood offices but later amending its call and instead urging protesters to hold peaceful rallies in Cairo.

The protests held on Friday against the Brotherhood were small, but were seen as a significant test of how Morsi will respond to the opposition.

The case against Afifi is one of several lawsuits brought forward mainly by Islamists against journalists in Egypt, accusing them of inflammatory coverage and inciting the public against the Brotherhood.

The New York-based Committee to Protect Journalists hailed the new law, but urged authorities to halt "an alarming rise in repression that has included newspaper confiscations, criminal prosecutions, and assaults against journalists".