Stella Nyanzi, one of Uganda's most controversial academics and activists, appeared in court Monday, after being arrested and charged Friday with cyber harassment and the misuse of a computer, for "shaming" the government.

Nyanzi's latest run-in with the 31-year-old regime of President Yoweri Museveni began with a fight for free sanitary pads for school-age girls.

"She's the one person who has dared to come out strongly in the country and say what many have feared to say many, many times," said Kasha Jacqueline Nabagesera, an LGBT rights activist, shortly after leaving the courthouse.

During the 2016 elections, Museveni and his wife, Janet, promised to provide free pads to poor young girls across the country. That's important, because as this blog has reported, in several in-depth surveys of girls across Africa many reported that they did not have access to products such as pads, that their schools lacked toilets and that they had not been given even basic information about managing their periods — all of which can make it challenging for a girl to attend class during her period. In the surveys, girls also reported a range of concerns about their periods including fear, shame and embarrassment.

The elections passed; Museveni won. Earlier this year, Janet Museveni told the country's Parliament the promised free sanitary pads werent going to happen because the country was facing a tough economic climate.

Nyanzi was furious. She decided if the government wasn't going to do it, she would. So she started a crowdfunding campaign, and she also unleashed a torrent of criticism toward Museveni, his wife and his supporters.

Her criticisms flowed into her Facebook timeline. They were always pointed and sometimes profane.

In one of them, she writes that she refuses to call the president's wife "Mama Janet," as most Ugandas do:

"What sort of mother allows her daughters to keep away from school because they are too poor to afford padding materials that would adequately protect them from the shame and ridicule that comes by staining their uniforms with menstrual blood? What malice plays in the heart of a woman who sleeps with a man who finds money for millions of bullets, billions of bribes, and uncountable ballots to stuff into boxes but she cannot ask him to prioritize sanitary pads for poor schoolgirls? She is no Mama! She is just Janet!"

Uganda is a country where people usually speak ill of their president only in hushed tones. And with reason: The Ugandan government has been known to arbitrarily detain and in some cases torture its political opponents.

Nyanzi, a social science researcher and anthropologist, has been known for years in Uganda as a rabble-rouser. Last year, when she had a dispute with her university, she protested by taking off all her clothes. She has used humor and shock value to educate Ugandans on issues of sexuality. She once wrote a lyrical post about getting an STD. When educating girls about their periods, she used song and dance to teach them that there is nothing not to love about their bodies.

But the attacks on Uganda's first lady got her suspended from her university job. And that just seemed to fuel her fire. She posted one video of herself in front of her mother's grave. If Museveni had bought medicine instead of bullets, she says, her mother and father would still be alive today.

She also posted a picture of her three young children. She wrote that people ask her: How could you speak so freely, so critically when you have young children to care for?

"My children will live through the coming liberation and the revolution," she wrote. "And so, I speak the dirty truth to power without fear or favor so that my children will learn to breathe living fire to frozen governments. I take my children to peaceful protests and meetings for civil disobedience so that they learn their civic duty to defy this evil regime. For the children, I refuse your silence, your inertia and your sweet hollow words."

When Nyanzi appeared in court Monday, prosecutors said she needed to be evaluated by a psychologist. They charged her with "cyber harassment" for comparing President Museveni to "a pair of buttocks." Nyanzi was also charged with using the Internet to "disturb the peace, quiet or right to privacy" of Museveni.

Nyanzi rejected all those charges.

Nabagesera, who is helping Nyanzi coordinate her response, says the arrest came on the same day they were supposed to deliver pads to the former parliamentary district of the first lady. The government, she says, was embarrassed.

Copyright 2017 NPR. To see more, visit http://www.npr.org/.