Two Tunisian policemen have been convicted of raping a woman and sentenced to seven years in prison in a case that has captured international attention for the victim.

Earlier in court the two policemen had denied the charge, instead accusing the woman of seeking to have sex with them, provoking an emotional outburst from the alleged victim.

The defendants say they found the woman, known by her pseudonym Meriem Ben Mohamed, and her boyfriend having sex in their car in a Tunis suburb. Three officers faced trial over the September 2012 incident and two of them were accused of rape.

According to the charges, they then took the woman to a police car, where two of them took turns to rape her, while the third policeman allegedly tried to extort money from her fiance at a bank cashpoint. He was given a two-year prison sentence, a judicial source said.

"They denied everything," Radhia Nasraoui, a lawyer of the Ben Mahamed, told the AFP news agency.

One of the accused claimed instead that the woman tried to perform oral sex, Nasraoui added.

After the verdict came out late on Monday, Nasraoui said she was "very disappointed" and thought it was too "lenient".

Supporters protesting

Outside the court house, a small group of supporters waved banners and shouted slogans, including Amina Sboui, a former member of the women's protest group Femen.

"I'm here to support Meriem and all women victims of rape. Anyone guilty of raping a woman should be punished," Sboui said, urging victims to take legal action.

Speaking before Monday's hearing, Ben Mohamed, who has already published a book in France entitled Guilty of Being Raped, giving her account of what happened, had said she was not optimistic about the outcome of the trial, which she described as an "ordeal".

The public prosecutor also tried unsuccessfully to bring indecency charges against the couple, sparking a storm of protest and a campaign of support for Ben Mohamed, who was 27 when the incident took place.

Journalists had been barred from attending the closed court session.