KAMPALA (Reuters) - Ugandan police have surrounded the homes of several opposition politicians and lawyers after receiving what a police spokesman said was information that they would “incite people to riot” over a court hearing for a detained opposition lawmaker.

The detention of lawmaker Robert Kyagulanyi and four other politicians critical of President Yoweri Museveni triggered two days of anti-government demonstrations in the capital Kampala and other parts of the country this week.

Kyagulanyi attended a military court hearing in the northern town of Gulu on Thursday.

Ugandan police spokesman Emilian Kayima said that the opposition leaders whose homes were surrounded had been placed under “preventative arrest” to try to prevent further unrest.

“We have intelligence reports that these leaders were inciting people to riot yet they have other lawful avenues, like petitioning a higher court, to seek redress about their fate of their colleague,” Kayima told Reuters.

“We don’t want to experience what we went through on Monday,” he said, referring to a demonstration in Kampala at which Ugandan police fired tear gas and military units were deployed to disperse protesters.

Representatives of several prominent opposition politicians said on social media they had been prevented from leaving home. An aide to one of the politicians, Kizza Besigye, who contested and lost four elections against Museveni, said on Facebook that Besigye had planned to attend Kyagulanyi’s court appearance.

Kyagulanyi, a musician-turned-lawmaker who goes by the stage name Bobi Wine, and the four other lawmakers were arrested on Aug. 13 on suspicion of involvement in the stoning of a presidential convoy during a parliamentary by-election campaign.

Kyagulanyi was charged on Aug. 16 with unlawful possession of weapons and ammunition while three other lawmakers and dozens of other people were charged with treason.

The musician, whose songs are stingingly critical of Museveni’s government, has a large youth following. He entered parliament last year.

On Tuesday, Kyagulanyi’s lawyer told Reuters that his client has been left unable to stand after being beaten while in detention. The lawyer cited relatives who visited him. The Ugandan government denied the assault accusation as “rubbish”.

Protesters and opposition supporters accuse Museveni, in power since 1986, of stifling dissent through intimidation, beatings and detentions, charges which his government denies.

Last October, when parliament was debating whether to remove a constitutional age limit that would have barred Museveni from seeking re-election in 2021, security forces and protesters clashed on the streets and two protesters died.

The presidential age limit has since been removed.