What would you do if you were out with friends at a coffee shop, the police arrived and arrested you all for being “indecently dressed” — you’re wearing trousers — and decided your punishment was a public flogging: 40 lashes each?

Sudanese journalist Lubna Hussein went head-to-head with her country’s outrageous “dress code” law in style. She insisted on a trial (10 of the women arrested with her accepted a fine and flogging), showed up in the Khartoum court wearing the very same trousers that got her arrested in the first place and — the cherry on the cake — she sent out 500 invitations to journalists and activists to come and watch.

Dozens of women, many in trousers, and several men turned out to support Hussein and were promptly tear-gassed and beaten by police. Any doubt on how far Hussein has upended the system in Sudan was laid to rest when the Sudanese regime barred her from travelling to Lebanon earlier this week to give a television interview on her trial.

Hussein’s trial resumes Sept. 7.

For years the Sudanese regime had played a cheap game of flaunting its “Islamic principles” over the bodies of women. It has flogged thousands of both Muslim women and non-Muslim southern Sudanese women for supposedly violating Islamic principles.

Many silently endured the misogyny and injustice; they were poor, socially vulnerable or ashamed. But Hussein has brilliantly used her position and clout to fight back. She is a journalist who knows all about shaping the narrative. She was also a press officer for the United Nations, a position that could have earned her immunity from charges and a flogging, but she chose to resign and fight instead.

And most importantly she is a Muslim woman who knows that a flogging for wearing trousers is sheer and utter nonsense — she has said she was ready to “receive (even) 40,000 lashes” if that’s what it takes to abolish the indecency law.

A Sudanese friend who recently visited Khartoum told me she’d seen friends and relatives dressed in T-shirts and trousers at parties she went to without consequence, an indication the regime had turned down some of its “Islamic” zeal.

Hussein’s case could be one of police gone wild, thinking they could get away with what is business as usual — teach a group of women “morals.” But they didn’t reckon they had to deal with a media-savvy woman, a pride to Sudan’s feminist movement and women everywhere.