A Mogadishu court has sentenced an alleged rape victim and a Somali journalist who interviewed her to one year in prison each, court officials say, in a decision that has enraged press freedom groups.

Abdiaziz Abdinur Ibrahim, the freelance journalist, and the 27-year old unidentified woman who claimed to have been raped by security forces, faced charges including insulting a government body, making false accusations and seeking to profit from the allegations. 

Tuesday's ruling was based on alleged medical evidence that showed the woman was not raped, Somali officials said. 

"Journalists should be allowed to report freely on issues of public interest and should never face reprisal for their reporting"

- Joel Simon, executive director of CPJ

Ibrahim, who has been under detention since January 10, will begin serving his sentence immediately.

The woman is to begin her sentence after nursing her baby.

"The court finds that he offended state institutions by making a false interview, and entering the house of a woman whose husband was not present," said Judge Ahmed Adan.

The journalist's arrest followed increasing media attention on reported sexual abuse by Somalia security forces. Earlier in January, Universal TV - a local television station -  and Al Jazeera's website separately published stories about allegations of rape in the city's crowded camps for displaced people.

Ibrahim had not been involved with either story, does not work for either organisation, and had not published anything of his own investigation before he was detained.

Verdict criticised

Human rights groups said the trial was politically motivated, designed to cover up rampant sexual abuse of women by Somali security forces.

The court's decision was "a terrible miscarriage of justice and sends a chilling signal to victims of sexual assault", Daniel Bekele, Africa director of Human Rights Watch, a non-governmental organisation, said after the verdict.

The trial of the alleged rape victim, her husband, and the freelance journalist on charges of insulting a government body, sparked international concerns over sexual violence and press freedom in the country.

"Journalists should be allowed to report freely on issues of public interest and should never face reprisal for their reporting. We trust that you will help us in bringing this matter to his attention," said Joel Simon, executive director of the Committee to Protect Journalists (CPJ), in the statement sent on Friday. 

But Hassan Sheikh Mohamud, the president of Somalia, told Al Jazeera on Sunday that his government "is the only government that has proven" it is dedicated to improving the lives of women in the nation, he will not directly interfere in the ongoing court case.

"I don't have the right to interfere in the judicary system ... My interference into the judiciary system, will never help the rule of law in Somalia",  Mohamud told Al Jazeera.

The president's statements did little to assure rights groups. "The case was built on groundless charges and serious due process violations and should have been thrown out," Bekele said. "The government should swiftly move to exonerate and release the defendants."

Source: Al Jazeera and agencies