CAIRO (Reuters) - An Egyptian blogger has been released after serving four years in prison on charges of insulting Islam and the president, a human rights group and an interior ministry source said on Wednesday.

The Arabic Network for Human Rights Information (ANHRI) said blogger Abdel Kareem Nabil, 26, known as Kareem Amer, was in bad health and was beaten by security officers before his release on Tuesday.

A Cairo-based source from the Interior Ministry confirmed Amer had been release on Tuesday but denied the blogger was beaten by officers.

A student at the state-run religious al-Azhar University, Amer was arrested in 2006 on charges of insulting Islam and President Hosni Mubarak in his blog posts. He was sentenced to four years in prison and expelled from the university.

“Kareem was released on Tuesday morning and his health is bad but he is safe now,” Gamal Eid, head of ANHRI, which represented Amer at court, told Reuters.

“He was detained for 11 days beyond his court sentence and beaten by officers who did not give any reasons,” Eid added.

The first blogger to face trial in Egypt for online content, Amer was first released on November 5 from Alexandria’s Borg el-Arab prison where he stayed for four years.

But he was immediately re-arrested by state security for 11 days without charge and beaten, ANRHI said.

“His situation has gotten worse after he was detained despite completing his sentence,” said Eid.

The Interior Ministry source said there had been orders to re-arrest Amer after his release on November 5 but did not elaborate.

Amer was unavailable for comment but Eid said the blogger would speak to the media in a few days.

International human rights groups had protested Amer’s detention beyond his court-sentence and called for his release.

Human rights organisations have accused Egyptian police of frequent brutality against detainees.

Egyptians say security forces act with impunity under an emergency law allowing indefinite detention and curbs on anti-government activity or forums. The government says the emergency law is aimed at dealing with drug and terrorism cases.

Amnesty International called on Egypt on Tuesday to launch an immediate probe into allegations Alexandria police tortured a 19-year-old detainee to death.

In July, two policemen from the same police station went on trial charged with the illegal arrest and torture of anti-corruption activist Khaled Said, who died in their custody.