NAIROBI, Kenya — A Sudanese woman who wore pants in public was fined the equivalent of $200 but spared a whipping on Monday when a court found her guilty of violating Sudan’s decency laws.

The woman, Lubna Hussein, an outspoken journalist who had recently worked for the United Nations, faced up to 40 lashes in the case, which has generated considerable interest both inside and outside Sudan.

Mrs. Hussein vowed to appeal the sentence and even walked into the court in Khartoum, Sudan’s capital, wearing the same pair of loose-fitting green slacks that she had been arrested in.

Manal Awad Khogali, one of her lawyers, said the judge hearing the case had called only police witnesses to testify and refused to allow Mrs. Hussein — who had pledged to use her trial to bring attention to women’s rights in Sudan — to defend herself.

The judge had threatened to jail her for one month if she did not pay the fine. But according to The A.P., Mrs. Hussein said flatly: “I would spend a month in jail. It is a chance to explore the conditions in jail.”

Photo

The Sudanese journalist Lubna Hussein outside the court in Khartoum after a final hearing in her case on Monday.Credit
Ashraf Shazly/Agence France-Presse — Getty Images

On Monday night, after refusing her lawyers’ advice to pay, Mrs. Hussein was whisked off to jail, though her lawyers said that in the coming days a committee formed for her defense might pay the fine and free her.

Sudan is partly governed by Islamic law, which calls for women to dress modestly. But the law is vague. According to Article 152 of Sudan’s penal code, anyone “who commits an indecent act which violates public morality or wears indecent clothing” can be fined and lashed up to 40 times.

It was the potential lashing, customarily carried out with a plastic whip that can leave permanent scars, that seemed to raise so many eyebrows. On Monday, diplomats from the British, French, Canadian, Swedish and Dutch Embassies showed up at the Khartoum courthouse, along with a throng of female protesters, many wearing pants. Witnesses said several bearded counterprotesters in traditional Islamic dress also arrived and yelled, “God is great.”

An error has occurred. Please try again later.

You are already subscribed to this email.

Riot police officers broke up the demonstration and took away more than 40 women. Sudanese officials said they were released shortly afterward. Witnesses said the police beat up at least one woman.

Mrs. Hussein is a career journalist who recently worked as a public information assistant for the United Nations in Sudan. She quit, she said, because she did not want to get the United Nations embroiled in her case.

Sudan’s leaders are eager to normalize relations with the United States and other Western countries and appeared to come up with a solution in which Mrs. Hussein was punished but not so severely as to attract more international outrage.

She was arrested in July, along with 12 other women, who were caught at a cafe wearing trousers.

“I am Muslim; I understand Muslim law,” Mrs. Hussein said in an interview on Friday. “But I ask: What passage in the Koran says women can’t wear pants? This is not nice.”