Thousands of women in Sudan run the risk of a flogging if police decide their clothes - mainly trousers - are provocative.
The penal code, which stipulates a maximum of 40 lashes for indecent clothing, was challenged by Lubna Ahmed Hussein, the journalist and former UN worker who defiantly went to jail on Monday after refusing to pay a fine for wearing slacks in public.
In her case, the court opted for the 500 Sudanese pounds (200 dollars) fine rather than a flogging, but ten of the 12 other women who were arrested in a Khartoum restaurant at the same time as Hussein have been whipped for their offence.
Hussein, who was released after one day when the journalists' union paid her fine, felt the loose trousers she was wearing when arrested were not indecent and the incident spurred her to wage a public challenge to the law.
She resigned from the United Nations so she could stand trial and publicise her campaign.
In the trial, the judge sought to determine whether her trousers were too tight, according to witnesses in the court, which was closed to journalists.
There is no exact method to determine which trousers are illegal, leading to whimsical arrests and verdicts, her supporters say.
A police officer testified that she was the worst dressed among the people arrested along with her, Hussein said after the trial.
She has pledged to continue fighting the law, challenging anyone to provide her evidence that it has grounds in the Koran and the Prophetic traditions, which comprise the source of Islamic legislation.
"I'm ready for anything to happen. I'm absolutely not afraid of the verdict," she told AFP in an interview on August 3. "If I'm sentenced to be whipped, or to anything else, I will appeal. I will see it through to the end, to the constitutional court if necessary.
Her trial led to a public outcry abroad and attention toward women's rights in Sudan.
"Lubna Hussein's case is, in our view, emblematic of a wider pattern of ... application of discriminatory laws against women in Sudan," Rupert Colville, spokesman for the United Nations High Commissioner for Human Rights, said on Tuesday.
In Sudan, Hussein's trial drew demonstrations outside the Khartoum court house where she came to one hearing dressed in the same slacks she wore when she was arrested in July.
Several of the women arrested with her were Christian and have a legal right to non-Muslim arbitration, though Sudan's north has been subject to Islamic law since 1991 -- two years after the coup that brought President Omar al-Beshir.
It is not in force in the mostly Christian south, which became autonomous after a 2005 deal that ended a two-decade civil war with the north.
Yassir Arman, a senior official with the Sudan People?s Liberation Movement (SPLM), the governing party in the south of the vast country, said the law violates both Christian and Muslim women's rights.
"It undermines the basic rights of Sudanese, Christian and Muslim," he said, adding that he also believes it violates an interim constitution drawn up in 2005.