Readers of the Guardian's news section may have seen that Hossein Derakhshan, the prominent Iranian blogger, has been jailed for 19 and a half years by a court in Tehran.

Derakhshan, who also has Canadian citizenship, was apparently convicted of "co-operation with hostile countries, spreading propaganda against the establishment, promoting counter-revolutionary groups, insulting Islamic thought and religious figures and managing obscene websites".

My first reaction was relief that he is not to be executed, since there were reports a few days ago that prosecutors were seeking the death penalty. But, even so, 19 and a half years is a shocking sentence for activities that would not be a crime at all in many countries.

News of Derakhshan's sentencing came almost at the same time as the news from another trial – this time in Egypt – where Hisham Talaat Moustafa, a billionaire property magnate and prominent member of President Mubarak's party, got a sentence of just 15 years for paying a hitman $2m to kill the famous Lebanese singer, Suzanne Tamim.

The case proved deeply embarrassing for the Egyptian regime but, because of Tamim's fame and the publicity that surrounded her murder, the authorities had little option but to prosecute Moustafa.

At his initial trial, last year, Moustafa was sentenced to death for the crime, along with the hitman, a former Egyptian police officer. Nobody seriously expected him to be hanged: the question was what device would be found to save him from the gallows.

Soon after his sentencing, he allegedly developed heart problems and there was talk of his lawyers applying to have him transferred from prison to hospital. Meanwhile, there were reports that a group of Egyptian MPs were planning to introduce a bill in parliament to allow blood money to be paid in murder cases.

There were also rumours (denied by his lawyers) that Moustafa had offered $125m in blood money to Tamim's family.

In the end, it was decided that his trial had been flawed and a retrial was ordered. We may never know whether money has actually changed hands but the retrial ended abruptly yesterday, when the judge – reportedly without bothering to hear a summing-up from defence lawyers – sentenced Moustafa to 15 years, and the hitman to life.

This is the way things generally work in the Middle East, where blogging can get you a heavier sentence than commissioning a murder. Much, of course, depends on who you are, what you represent, and the strength of your wasta (connections).

In a way, it's invidious to single out Hossein Derakhshan's imprisonment when there are so many other people – unknown in the west – who have been jailed unfairly in Iran. But Derakhshan wrote more than a dozen articles for Cif in its early days and for that reason we have been following the case since his arrest was first reported back in 2008.

There is the possibility of an appeal, but if that doesn't succeed he may not be blogging again for a very long time, unless the Iranian people manage to rid themselves of their oppressive regime in the meantime.