By Richard Hamilton
BBC News, Casablanca
Crowds of journalists and the families and friends of the two defendants strained to hear the judge as he delivered his verdict in the cold courtroom of the Casablanca High Court.
The journalists were relieved but defiant after the sentence
Two Moroccan journalists have been punished for an article they wrote about religious jokes.
Driss Ksikes and Sanaa al-Aji awaited their punishment for writing an article about religious jokes.
The journalists from Nichane magazine were given three-year suspended sentences and ordered to pay fines of $8,000 each. They have also been banned from working for two months. The journalists say they will appeal.
It could have been a lot worse for them. The chief prosecutor had asked for prison terms of five years, the magazine to be closed forever and professional bans for the journalists for life. So they may feel the court granted them some clemency.
The story goes back to the December edition of Nichane magazine.
Nichane means "as it is" and the journalists said they were trying to describe Moroccan society as it is - by looking at jokes on religion, politics and sex.
The trouble was, the government did not see the funny side. It withdrew copies of the magazine from news stands and hauled the authors up in court. A trial was held last Monday and the sentences were delivered a week later.
'This is blasphemy'
Driss Ksikes told me after the verdict it was a sad day for Morocco.
He still stood by what he had written.
"I don't regret what I wrote," he said, "because these are jokes produced by society. We tried to understand the Moroccan mentality. But at the same time, I realised there are so many layers of readers in our society, and that's why we apologised to those who felt offended."
And there certainly were many people who felt offended.
"They have insulted our God, our prophet and our religion," one woman told me, "they should be punished".
"There must be limits to freedom of expression. This is blasphemy," said another.
But other journalists believe freedom of expression has taken a serious blow in Morocco.
Aboubakr Jamai, who edits Le Journal, said the case should never have gone ahead.
"I'm afraid we are going backwards," he said, "despite the relative clemency of the sentence."
"We could have advanced the cause of freedom of expression in the first place if the government had not prosecuted Nichane. But they decided to go ahead with it and then felt obliged to sentence them."
The case may have some further impact, however. It now looks likely that the Moroccan press code, which is nearly 50 years old, will be amended so that journalists cannot receive prison sentences in the future.
But what of these journalists? Have they been humbled by this decision?
Driss Ksikes said he would carry on writing even if it meant facing the wrath of the authorities.
"I don't like heroes. I am also a novelist and a playwright and I write all the time about anti-heroes," he said.
"I am a free thinker but I don't want to be a martyr - I want to stay alive."