Hundreds of women staged an angry protest outside the main courthouse in Tunis as a hearing began into whether or not a young couple who have lodged a rape claim against police should face charges of "immorality" in a public place.

Around 400 people demonstrated, furious that a charge had been introduced against the 27-year-old woman and her boyfriend. Two police officers are accused of raping the woman over a period of more than an hour on 3 September after surprising the couple in a parked car in a suburb of the capital.

The woman has recounted in media interviews how she had been in the driving seat, her boyfriend beside her, when three police officers approached. After threatening the couple with possible long prison terms if charged with "immorality", one of the police officers handcuffed the boyfriend and took him off to a cashpoint machine to extract 300 dinars (£120) from him. The two others allegedly took the woman into the back of their car and took turns to rape her.

A rape investigation was launched and the police officers allegedly involved are under arrest. But to the disgust of many Tunisians, the pre-trial magistrate looking at the case was given the go-ahead to launch a parallel investigation into whether the couple should face an "immorality" charge – punishable by up to six months in prison.

The case has provoked a furious debate over whether the Islamist-led government is upholding the ideals of the 2011 revolution, or presiding over a restriction on women's rights.

"I find this really alarming, the way the case has swung round to focus on the woman's behaviour, when you think that the revolution was about people demanding their rights," said Asma Ben Hassine, a 26-year-old student.

Amel Dachrani, a doctor at the demonstration on Tuesday, said that while a rape by police was bad enough, the case was emblematic of a new pressure on women to monitor their dress and behaviour in public places. This pressure came not just from the ruling Islamist party, but from more radical Islamist groups such as Salafists who have increasing influence especially in lower-income areas, she said. "There is a monitoring of women's dress styles. They want to install 'cleaner' behaviour," she said. "They think other Tunisians are too Europeanised."

The case has also raised questions about the ongoing reform of the Tunisian police. As feared enforcers under the regime of the former president Zine al-Abidine Ben Ali, the police had a reputation for brutality and resorting to sexual violence.

Mohamed Belhaj, a family man who had taken time off from running his air-conditioning business to join the protest, explained: "We want to know where we are on women's rights right now. We want the truth from the police. We want the government to understand that we are still ready to come out on to the streets to demonstrate."

A group of local rights organisations expressed their "deep concern" over the direction the pre-trial inquiry had taken, especially when "the young woman is still in a fragile psychological state". It also denounced an increase in women being "harassed [by the police] over their style of dress or during evening outings when they are not accompanied by a male relative".

As controversy over the handling of the rape investigation snowballed, the government fielded the minister for women, Sihem Badi, a member of the non-religious Congress for the Republic party and a former political exile. The courts must be allowed to do their work "without being in any way influenced by the political world, the world of the street, or the world of the media", Badi said. But she praised the young woman, who had "broken the wall of silence" that surrounds rape and other violence against women.

A decision is expected from the magistrate in coming days over whether there is a case to answer on the "immorality" charges against the couple, in addition to the rape case against the police.