Dozens of protesters have rallied outside a Khartoum court in support of a Sudanese woman facing 40 lashes for wearing trousers in public, a case that has become a public test of Sudan's indecency laws.

Lubna Hussein, a former journalist and UN press officer, was arrested with 12 other women during a party at a Khartoum restaurant in early July and charged with committing an indecent act.

Women's groups say the law gives no clear definition of indecent dress, leaving the decision of whether to arrest a women up to individual police officers.

Ululating women outside the courtroom carried banners and headbands with the message "No return to the dark ages" and shouted slogans against the dress laws.

Speaking after the hearing, Hussein said the judge had adjourned her case until September 7.

"They want to check with the UN whether I have immunity from prosecution. I don't know why they are doing this because I have already resigned from the United Nations. I think they just want to delay the case," she said.

Riot police advanced towards the crowd, beating their shields with batons, to try to disperse them. One officer fired what appeared to be blank rounds into the air, a witness said.

"We are against this law. It is against women, against Islam and against human rights," said Zainab Badradin, one of the women in the crowd.

Indecency cases are not uncommon in Sudan, where there is a large cultural gap between the mostly Muslim and Arab-oriented north and the mainly Christian south.

Hussein has attracted attention by publicising her case, posing for photos in her loose green trousers and inviting journalists to campaign against dress codes sporadically imposed in the capital.

Her case has attracted widespread support among women's groups in Khartoum, but there were also men among Tuesday's protesters.

"Her main argument is that her clothes are decent and that she did not break the law," defence lawyer Nabil Adib Abdalla said shortly before the hearing.

"Failing that, we will ask for a stay of the proceedings to challenge the trial in the constitutional court ... We are saying the law is so widely drafted that it contravenes her basic right, her right to a fair trial," he added.

- Reuters