Ugandan prosecutors on Wednesday charged an author with communications offences and remanded him in custody, the latest target of a crackdown on writers critical of long-ruling President Yoweri Museveni and his government.

The author, Norman Tumuhimbise, was detained last week along with eight other individuals who together are activists in a pressure group, their lawyer, Eron Kiiza, told Reuters.

Seven of them were released late on Tuesday while two them, Tumuhimbise and a colleague, were charged in a court in the capital Kampala on Wednesday with engaging in cyberstalking and offensive communication.

According to the charge sheet, the two "wilfully, maliciously, and repeatedly" used electronic communication and published books aimed at disturbing Museveni's peace and quiet.

"This is just a clamp-down on freedom of expression, no one in Uganda is free to talk about the first family or write about it in critical terms," Kiiza told Reuters.

"It is the latest indication of harassment and torture of people who write critically of Museveni and his family. They are saying Ugandans are free to talk about football, beer, entertainment but not Museveni or his leadership style."

Tumuhimbise is author of "Unsowing the Mustard Seed," a book critical of Museveni and his government. Before he was arrested he was promoting the launch of a new book entitled "Liars and Accomplices" that was due to take place at the end of this month

Critics and the opposition have slammed Museveni's government for repressing critical artists and authors which they say mirrors a widening campaign to muzzle all dissent.

A prominent Ugandan author, Kakwenza Rukirabashaija, was detained in December last year and later said he had been repeatedly assaulted in custody, in a case that prompted the United States and European Union in February to demand punishment for perpetrators of torture in the country.

Police at the time did not respond to a Reuters request for comment about the allegations of torture. The government usually denies such accusations saying most are false while in the cases where abuses have been committed, the perpetrators have been punished.

Rukirabashaija was later charged with communications offences related to his tweets that criticised Museveni and his son, Muhoozi Kainerugaba, a general in the military.

Rukirabashaija has since fled into exile in Germany where he joined another author, Stella Nyanzi, who also fled after being harassed by Museveni's government.