Sudan elections
Sudanese women prepare to vote at a polling station outside Khartoum, Sudan, on April 14, 2015, the second day of voting in the country's national elections. Patrick Baz/Agence France-Presse/Getty Images

A group of women in Sudan were arrested for wearing pants, according to the BBC Sunday. The 24 women were charged with indecency.

The women were caught at a party near the Sudanese capital of Khartoum Wednesday. Sudanese law prevents people from wearing “an obscene outfit” or “causing an annoyance to public feelings.”

Women wearing pants is considered an obscene outfit and lawbreakers face a punishment of 40 lashes and a fine, according to the BBC.

Critics of Sudanese law which borrows heavily from Muslim customs say that the laws can be applied arbitrarily, that they discriminate against Christians and that they affect tens of thousands of women each year who are arrested and flogged.

Human rights group Amnesty International has criticized the laws in the past.

“Flogging and other forms of corporal punishment should never be used as punishment -- they constitute torture, and should not be inflicted as part of a justice system,” Amnesty International said.

“Moreover, these women have committed no crime -- they have instead been subjected to random, vaguely worded, discriminatory laws.”

Women in Sudan typically wear long and loose fitting robes.

Sudanese professor and activist Amira Osman blasted the arrests in an interview with Netherlands-based Radio Dabanga.

“The party took place in a closed hall in a building in [the city of] El Mamoura, the girls were arrested for wearing trousers, despite obtaining a permit from the authorities,” she said.

The law was developed as part of Sudan’s 1991 Criminal act and bans “indecent or immoral dress.”

Osman calls the law a violation of women’s rights.