Somalia's Supreme Court has freed a reporter imprisoned for interviewing a woman who alleged she had been raped by soldiers, in a case that has sparked widespread international criticism.
A Supreme Court judge said on Sunday the charges had been dropped and the court "has given journalist Abdiaziz Abdinuur his freedom back".
Both Abdinuur and the woman were initially sentenced to a year in prison for "offending state institutions". But all charges were dropped against the woman earlier this month, while Abdinuur's sentence was halved.
His release, following more than two months' incarceration and after an appeals court ruled he must remain in jail, came as a surprise to many.
The 25-year-old reporter walked out of the courtroom offering prayers of thank for his release and thanking those who had supported him.
"I'm very happy that I got my freedom back, I thank those who worked in this process that helped my release including my lawyers", he said.
Sexual violence research
Abdinuur was detained on January 10 while researching sexual violence in Somalia, but did not air or print a story after interviewing the woman.
He was also found guilty of "making a false interview, and entering the house of a woman whose husband was not present".
|Activists opposed Ibrahim's arrest from the outset
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, which Human Rights Watch (HRW) said was an "unscientific and degrading practice that has long been discredited".
When she was sentenced, the woman was allowed to defer her prison term for six months to breastfeed her infant.
United Nations chief Ban Ki-moon said at the time he was "deeply disappointed" over the case.
Abdinuur works for several Somali radio stations and international media outlets.
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.
Amnesty International, HRW and the Committee to Protect Journalists said in a joint statement during the trial that the case was "linked to increasing media attention given to the high levels of rape" including by security forces in the country.
Prime Minister Abdi Farah Shirdon said he welcomed the decision by the Supreme Court to free the journalist.
"I have publicly stated my concerns about this case in the past few weeks and I have also declared that it was not appropriate for the government to interfere with the judiciary, whose independence is guaranteed under our constitution," the prime minister said.
"We have been determined to let justice take its course and, although it took longer than I would have liked, today we can say that justice has been done," he added.
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 Mohamed Siad Barre in 1991.