(CNN) -- A Somali court has sentenced a woman to a year in prison after she accused security forces of raping her.
A journalist who interviewed her was also sentenced.
The Mogadishu court ruled that the 27-year-old woman made false rape accusations against security forces during an interview last month, and in so doing insulted the government, according to rights groups.
"A midwife testified ... that the woman was not raped after conducting a finger test, an unscientific and degrading practice that has long been discredited because it is not a credible test," Human Rights Watch said in a statement.
Though journalist Abdiaziz Ibrahim interviewed the woman but never filed a story, authorities also found him guilty of fabricating a false claim, according to rights groups.
Both were sentenced to one year each Tuesday.
The court deferred the rape victim's sentence for one year because she is breastfeeding, and ordered the release of her husband and two others who had helped her meet the journalist, according to rights groups.
The alleged rape took place in August.
"This case has been flawed by serious violations of due process from the start," said Daniel Bekele, Africa director at Human Rights Watch. "The long pre-trial detention without charge, official smears of the defendants in the media, and the abusive police efforts to discredit and intimidate a woman who alleged rape, point to a government more concerned with deflecting criticism than protecting ordinary citizens."
The case has sparked international condemnation, prompting Somalia to launch an Independent human rights commission. Prime Minister Abdi Farah Shirdon said the commission will investigate the case.
"Respect for women's rights and media freedom are fundamental to ensuring the development of a strong, stable, and vibrant democracy in Somalia," the White House said in a statement Tuesday. "Women should be able to seek justice for rape and other gender-based violence without fear of retribution, and journalists in Somalia must be free to work without being subjected to violence and harassment."
United Nations chief Ban Ki-moon called on Somalia to ensure that the journalist and the woman get a fair trial, including the right of appeal.
The international outcry comes after the United States' official recognition of the Somali government after more than two decades.
The case came to light as the Somali president, Hassan Sheikh Mohamud, was visiting the United States and Britain for the first time since taking the reins last year.