Ugandan academic and government critic Stella Nyanzi, who has been arrested for insulting the East African country's president and first lady, is set to appear in court on Monday, Kampala police said.

Nyanzi, a research fellow at Uganda's Makerere University, was detained at a hotel in the capital on Friday shortly after hosting a fundraising drive to raise money for sanitary pads for schoolgirls.

Police spokesman Asan Kasingye said on Sunday that Nyanzi was arrested for violating a law against misusing computers and that she would be charged with the offences of cyber harassment and offensive communication.

Nyanzi is popular on Facebook for her relentless criticisms of Ugandan President Yoweri Museveni, who has ruled since 1986. Museveni's critics increasingly warn that he plans to rule for life.

Some Ugandan politicians have been recently saying they would back a proposal to remove the age limit from the country's constitution, the last obstacle to a possible life presidency for Museveni.

Campaign promises

On Facebook recently, Nyanzi rebuked First Lady Janet Museveni, who also serves as education minister, for saying the government had no money to buy sanitary towels (napkins) for poor schoolgirls, although the president had promised to budget for them when he was campaigning for re-election last year.

Many Ugandan girls are reported to drop out of school because of the shame they feel for lacking sanitary pads.

"I totally reject the idea that one cannot ... and should not criticise the people responsible for abusing the rights of Ugandans and resources of Uganda through thirty-one years of increasing despotic family rule," Nyanzi said in one of her Facebook posts.

"As a thinker, scholar, poetess, lyricist, writer, Facebooker and creative producer, it is my responsibility to boldly critique the corrupt tyrants of the day."

Nyanzi has described the first lady as "foolish" and out of touch with the problems of ordinary Ugandans.

The academic, who trained as a medical anthropologist, often uses sexual imagery to underscore her points on Facebook, leading many to accuse her of obscenity in this conservative country.

But her fans say she is an honest activist who is using her literary skills to fight for the poor.

In an interview with a local TV station, the first lady said she had chosen to "forgive" Nyanzi's criticisms, which she described as hurtful.

"I still don't know what kind of wrong I committed to deserve that kind of language and the names she chose to call me, and all that. I just wanted to tell people that I honestly forgave that lady," the first lady said.

"Because I don't understand how an educationist can use that language to say anything about anybody."