Human rights groups have condemned the 10-year jail term given to an Egyptian lawyer for criticising the government.
Amnesty International called the conviction of Mohamed Ramadan over online posts a “blatant assault on freedom”, and proof that anti-terror laws were being used to target critics.
Ramadan was convicted, under a 2015 law, of using Facebook to harm unity and incite violence.
The government says the law is needed to fight terrorism.
It is unclear exactly what Ramadan, who is based in Alexandria and has represented alleged victims of torture, posted online last year.
Campaigners in Egypt believe he was prosecuted for his work defending human rights activists and political prisoners, the BBC’s Orla Guerin reports from Cairo.
The lengthy sentence can be appealed against.
Mahienour al-Masry, a lawyer representing Ramadan, said his client was in hospital as the case was heard, the Mada Masr website reports.
The court ignored requests to adjourn the hearing and Ramadan was tried in absentia, the lawyer said.
On his Facebook page, Ramadan said he had been convicted by “the judiciary of the counter-revolution”, according to the Associated Press news agency.
He said he was confident the current government in Egypt would not last for that long.
In addition to the 10-year jail term, the court in Alexandria ordered that Ramadan remain under house arrest for a further five years, during which he will be banned from using social media.
Amnesty, a UK-based group, called the sentence “utterly shocking” and said Ramadan was “exercising his right to freedom of expression”.
The conviction is a “chilling illustration of the danger to peaceful critics” posed by the 2015 counter-terror law, Amnesty’s Najia Bounaim said.
President Abdul Fattah al-Sisi imposed a three-month state of emergency after bombings targeting Coptic Christian churches killed at least 45 people on Sunday.
The president has been criticised by local and international groups for severe restrictions on civil and political rights in Egypt. He was elected in 2014, less than a year after he toppled the previous president, Mohammed Morsi.
Under Mr Sisi’s presidency thousands of people have been arrested in a crackdown on Islamists and other critics of the government.