Stella Nyanzi
Academic Stella Nyanzi (C) arrives for an interrogation over cyber offences in March 2017 in Kampala, Uganda Twitter / NTV Uganda

A Ugandan prosecutor has demanded activist Stella Nyanzi, who has been charged with cyber harassment for referring to President Yoweri Museveni as "a pair of buttocks" in a Facebook post, to undergo a mental health examination.

The controversial university scholar, who has been held on remand after being charged, was back in court for a bail hearing on Wednesday morning (10 May), supported by two prison officers. The hearing was adjourned for 20 minutes because Nyanzi collapsed as she tried to get up.

While her lawyers argued that Nyanzi needed to be released on bail to get medical help, the state prosecutor said that she could be released if she meets the bail requirements but asked the court to ask for Nyanzi to have a mental health assessment, according to the BBC. She was later granted bail.

Speaking to the court, the lawyer said: "Only God and perhaps the doctors can tell this court what kind of sickness she is suffering from at the moment."

Described as "obscene or indecent", Nyanzi's Facebook post allegedly breached the Computer Misuse Act 2011. Nyanzi denies the charges, claiming she only write in metaphors.

Amnesty International in East Africa described the activist's case "a travesty" and a violation of the country's constitution.

Muthoni Wanyeki, the organisation's regional director for East Africa, last month said: "The state should stop wasting resources on pointless and politically-motivated prosecutions, immediately drop all charges against her and release her unconditionally."

The 42-year-old mother of three has been campaigning on a variety of issues.

In March, she accused First Lady and education minister Janet Museveni of not caring about poor Ugandan girls who missed school or dropped out for lack of sanitary pads, before launching her own fundraising campaign #PadsForUganda.

In Uganda's conservative society, the outspoken feminist has also come under fire for her advocacy work on LGBTI rights issues.

The Ugandan government is facing public discontent on issues as diverse as corruption, youth unemployment and rising cost of living, but rights groups say state agencies and officials – including police, security officials and local commissioners – have been intimidating and threatening critics and journalists to limit critical public reporting and debate.