The journalist, who has been in custody since September 16, was convicted during a one-day trial held without his lawyer being present, the CPJ said.
The sentence last Sunday was meted out by a regional court in Hargeisa.
The journalist’s lawyer, Mubarik Abdi Ismail, said the courts did not inform him or the accused’s family of the court date.
They learnt of the conviction only after Mohamed, who is an editor for the online news portal Horseed News and owner of the website Saylactoday, was sentenced.
However, the presiding judge, Ahmed Dalmar Ismail, said he informed Mohamed and his lawyer of the new court date.
“Ahmed, who is president of the Hargeisa Regional Court, said he permitted Mohamed to represent himself, which is allowed under Somaliland law,” said CPJ Africa programme co-ordinator Angela Quintal.
Guleid Ahmed Jama, chairman of the NGO Human Rights Centre in Somaliland, said the charges were linked to articles Mohamed allegedly wrote on sites including Gabile Media, in which he accused a group of private schools in Hargeisa of misconduct and corruption.
Mohamed’s trial had initially been scheduled for October 5.
“Dirir should never have been prosecuted in the first place and the manner in which this trial was carried out is unjust,” said Quintal.