They were sentenced on Tuesday in a trial described by human rights advocates as "a terrible miscarriage of justice".
The 27-year-old woman was accused of insulting a government body and making false claims. The court in the capital, Mogadishu, said it based its decision on medical evidence that she was not raped, but the judge deferred her sentence until she has weaned her infant child.
The freelance reporter Abdiaziz Abdinur Ibrahim was also given a jail sentence of one year. He interviewed the woman in early January but never filed a story. He too was charged with insulting state institutions. The two defendants are expected to appeal against their sentences.
"The court's decision to convict an alleged rape victim and the journalist who interviewed her is a terrible miscarriage of justice and sends a chilling signal to victims of sexual assault in Somalia," said Daniel Bekele, Africa director at Human Rights Watch.
"The case was built on groundless charges and serious due process violations, and should have been thrown out. The government should swiftly move to exonerate and release the defendants," he added.
The US state department has said the case is "a litmus test" for the future of Somalia. Human Rights Watch said last week that the case was politically motivated and designed to silence those who report on the pervasive problem of sexual violence by state security forces.
The international outcry surrounding the case is an embarrassment for the Somali president, Hassan Sheikh Mohamud, whose election last year was described by the international community as the start of a new era for Somalia after decades of instability and conflict.
The trial started as Mohamud toured Europe to garner international support to rebuild Somalia. He was in Britain on Monday where he met the international development secretary, Justine Greening.
William Hague said he had discussed the case with Mohamud. He tweeted: "Raised current rape case of concern in Somalia with the President, including the importance of victims feeling able to speak out."
The judge in the case, Ahmed Aden Farah, said on Tuesday that the woman was sentenced for offending state institutions by claiming she was raped, according to Agence France-Presse news agency.
"She will spend one year in prison after finishing the breastfeeding of her baby," the agency quoted him as saying. The woman's husband and two others who were also detained over the case have been released.
The woman was arrested on January 10, two days after she was interviewed by Abdinur Ibrahim and told him she had been raped by government forces last year. She was interrogated over two days without legal counsel and released after police said she retracted her story.
Protecting rape victims
There have been some signs of official discomfort over the progress of the case. On Sunday, Somalia's prime minister, Abdi Farah Shirdon Saaid, said authorities would do more to protect rape victims, and he promised to reform the armed forces and judiciary once the trial had concluded.
"We recognise the concerns of our international partners and we are only too aware of the enormous challenges our nation faces," he said.
The international community, especially Britain and the US, have enthusiastically backed Somalia's new government, which emerged last September after a UN-backed peace process to replace a corrupt and inefficient transitional authority. International donors have pledged millions of dollars to rebuild the country, including money destined for the security forces. – Guardian News and Media 2013