A Somali appeals court dropped charges on Sunday against a woman sentenced to a year in jail after she told a reporter she was raped by security forces, but said the journalist will remain in jail for six months.
"The court orders the release of the woman, while the journalist will spend six months in jail for offending state institutions," Judge Hassan Mohamed Ali said, cutting the reporter's original sentence in half.
"The court has learned that the journalist misled the alleged rape victim into the interview," the judge added.
Last month the woman and journalist Abdiaziz Abdinuur, 25, were found guilty of offending state institutions and sentenced to a year in jail.
Abdinuur -- who was detained on January 10 while researching sexual violence in Somalia, but did not air or print any report after interviewing the woman -- was also found guilty of "making a false interview, and entering the house of a woman whose husband was not present."
The woman, who had originally been granted a delay of six months before having to start her jail term to allow her to breastfeed her infant child, walked free from the court in the capital Mogadishu after the ruling.
But Abdinuur was led away in handcuffs and put into a truck that took him back to the central prison, sparking angry reactions from rights groups and journalist colleagues.
"This is completely insane and unjust," said Omar Faruk Osman, from Somalia's national journalists' union.
"How can they jail someone for interviewing a victim? The lawyers will appeal again and take the case to the Supreme Court."
Abdinuur works for several Somali radio stations and international media.
Amnesty International, Human Rights Watch and the Committee to Protect Journalists said in a joint statement during the trial the case was "linked to increasing media attention given to the high levels of rape" including by security forces.
The court had initially deemed the woman's story to be false after a midwife conducted a "finger test" to see if she had been raped, a practice HRW said was an "unscientific and degrading practice that has long been discredited".
Daniel Bekele, HRW's Africa director, criticised the continued jailing of Abdinuur.
"The court of appeals missed a chance to right a terrible wrong, both for the journalist and for press freedom in Somalia," Bekele said in a statement.
"The government has argued that justice should run its course in this case, but each step has been justice denied."
The initial case sparked widespread criticism, with United Nations chief Ban Ki-moon saying he was "deeply disappointed".
Since then rights groups and Somalia's journalist union have warned security forces have continued to crack down on the media.
Somalia has been ravaged by conflict since 1991, but a new UN-backed government took power in September ending eight years of transitional rule by a corruption-riddled government.
Many have said the new government offers the most serious hope for stability since the fall of dictator Mohamed Siad Barre in 1991.