Uganda's President Yoweri Museveni has warned protesters that they will be "playing with fire" if they press ahead with plans to stage an anti-corruption march to parliament on Tuesday.
Young Ugandans have been organising the march on social media to demand an end to corruption in government.
They have been partly inspired by their counterparts in neighbouring Kenya, who organised mass demonstrations that forced President William Ruto to drop plans to increase taxes. The protests have since morphed into calls for his resignation.
In a televised address, Mr Museveni warned the Ugandan organisers that their planned protest would not be tolerated.
"We are busy producing wealth… and you here want to disturb us. You are playing with fire because we cannot allow you to disturb us," he said.
Mr Museveni is accused by his critics of ruling Uganda with an iron hand since taking power in 1986, but his supporters praise him for maintaining stability in the East African state.
The president also accused some of the protest organisers of "always working with foreigners" to cause chaos in Uganda. He did not elaborate.
Police had earlier announced that they had refused to give permission for the march to take place.
One of the main protest leaders told AFP news agency that they would go ahead with it.
"We don't need police permission to carry out a peaceful demonstration. It is our constitutional right," Louez Aloikin Opolose was quoted as saying.
The UK and US governments imposed sanctions on Uganda's parliamentary speaker, Anita Annet Among, earlier this year after she was accused of corruption.
She has denied any wrongdoing.
The sanctions bar her from travelling to the UK and the US. The UK also said that it would impose an asset freeze on her.
The UK has enforced similar sanctions on two government ministers who were sacked by Mr Museveni after they too were accused of corruption.
Mary Goretti Kitutu and Agnes Nandutu have been charged in court over a scandal involving the theft of thousands of metal roofing sheets that were intended for vulnerable communities in the north-eastern Karamoja region.
Both have denied the charges.
In Kenya, President Ruto also called for an end to the protests that have hit his government, saying: "Enough is enough.”
The protests are the biggest in Kenya since Mr Ruto took office after winning elections in 2022.
Activists have planned further demonstrations for Tuesday to demand his resignation and for an end to what they call bad governance.
Addressing a rally in western Bomet County, Mr Ruto said the protest organisers could not remain "anonymous", and should “step forward and tell us what is this violence going to achieve”.
Some protesters stormed parliament last month setting part of it on fire and stealing the mace, the symbol of the legislature's authority.
Protest organisers say their demonstrations have largely been peaceful.
They accuse the police and the military of responding with brute force, and killing peaceful protesters.
At least 50 protesters have been killed and 413 injured since the protests started on 18 June, according to the state-funded Kenya National Commission on Human Rights.
Kenya's main opposition leader Raila Odinga has expressed solidarity with the protesters, saying there had to be justice for victims before any talks with the government could take place.
Mr Odinga's position could undermine Mr Ruto's attempt to include members of the opposition in his cabinet - a move which the hopes will help end the youth-led protests.