Abdel Kareem Soliman's trial was the first time that a blogger had been prosecuted in Egypt.
He had used his web log to criticise the country's top Islamic institution, al-Azhar university and President Hosni Mubarak, whom he called a dictator.
A human rights group called the verdict "very tough" and a "strong message" to Egypt's thousands of bloggers.
Soliman, 22, was tried in his native city of Alexandria. He blogs under the name Kareem Amer.
A former student at al-Azhar, he called the institution "the university of terrorism" and accused it of suppressing free thought.
The university expelled him in 2006 and pressed prosecutors to put him on trial.
During the five-minute court session the judge said Soliman was guilty and would serve three years for insulting Islam and inciting sedition, and one year for insulting Mr Mubarak.
This op-ed appeared in yesterday's Washington Post. As Kamal and Palmer note, one of the more tragic aspects of the story is the role that authorities at Al Azhar University played in Kareem's arrest and prosecution. Al Azhar is the most prominent institution of Islamic learning in the world, and is the world's second-oldest continuously operating university.
Esraa al-Shafei, who maintains the Free Kareem website, writes in today's Daily Star on the blogging phenomenon in the Arab world, and the promise and the threat it represents. It saddens and angers me to think where we might be today if President Bush had decided after 9/11 to cultivate genuine political reform in the Arab world, to respectfully but firmly encourage the opening of political space, rather than try to transform Arab societies at the point of a gun. It will be years until we even begin to grasp the extent of the damage this man has done to America's reputation in the world, but we can look at some of the early returns.