Ugandan security forces re-arrested a veteran opposition politician on Tuesday and broke up a protest in the capital that he was leading against soaring consumer prices.

Kizza Besigye, 66, who has been detained dozens of times and lost four elections to long-serving President Yoweri Museveni, had somehow slipped out of home arrest to address a swelling crowd in downtown Kampala when police detained him.

"We are holding him on charges of inciting violence," police spokesperson Luke Owoyesigyire said, adding that Besigye's driver and one other person with him were also held.

Social media images showed the politician standing on his vehicle before police moved in to tow it away with him still standing through the sunroof talking via a megaphone.

Soon after, soldiers began patrolling the city centre.

Like many around the world, Ugandans have seen a sharp jump in the cost of living, especially for fuel, cooking oil, wheat and soap. Besigye has been calling for tax cuts, but Museveni has refused relief, blaming the high prices on war in Ukraine and the COVID-19 pandemic.

"Removing taxes or subsidizing many of the imports is suicidal and a blunder," the 77-year-old president said in a speech on Sunday, advising Ugandans to be frugal.

There was no immediate comment from representatives for Besigye, who calls Museveni an autocrat clinging to power through repression and vote-rigging.