Mohammed Ramadan will also have to serve five years under house arrest following his jail sentence, and be banned from social media during that time.
It remains unclear what exactly Ramadan posted that led to his arrest. As a lawyer, he represented alleged victims of torture at the hands of the government.
The Alexandria court sentenced Ramadan under a 2015 law which makes it a crime to use social media to “harm unity” and “incite violence.” He was not present for his trial, and was sentenced in absentia, as he is currently hospitalized. His medical issues, or the general state of his health, have not been made public.
Human rights groups, including Amnesty International, are strongly condemning the sentence, which they have referred to as a "blatant assault on freedom."
"It is utterly shocking that the Egyptian authorities have imposed such a heavy sentence against someone who was exercising his right to freedom of expression," Najia Bounaim, deputy regional director for the Middle East and North Africa of Amnesty International, said in a statement.
Bounaim added that people should never be imprisoned over sharing their thoughts and opinions, even when considered offensive.
Supporters of Ramadan believe that his persecution is due to his work defending political prisoners and human rights activists, BBC reports.