Ugandan police released opposition leader Kizza Besigye on Monday, hours after detaining him for the second time in a month, but warned they would keep seizing him if he tried again to take part in protests against surging prices.

Besigye was mobbed by supporters after he walked free from the Kasangati police station on the outskirts of the capital, Kampala, and drove off in his car, a Reuters witness said.

A police spokeswoman confirmed Besigye's release.

Opposition activists have sought in past weeks to revive street demonstrations against the surging rate of inflation in east Africa's third biggest economy after a wave of deadly protests in April and May were crushed by President Yoweri Museveni.

The protest movement, led by the Activists 4 Change (A4C)group, has struggled to rally large numbers since then, mainly because Besigye has largely stayed away from demonstrations or been prevented from participating.

The police commander for the Kampala metropolitan area, Andrew Kaweesi, earlier told Reuters that Besigye was not going to be charged because he had not committed any crime.

He is being detained under preventive arrest which is provided for under our constitution, Kaweesi said shortly before Besigye's release.

Political analysts say the latest bout of civil action is unlikely to grow into a serious threat to the government given the international community's muted response to the previous crackdown.

But some backers of Besigye, defeated by Museveni at the ballot box for the third time in February, vowed not to cave in to government pressure.

The police have shown they are determined to violate (Besigye's) rights and we are saying we will be with him every time he walks, said 29-year-old Martin Lutalo.

They will get exhausted at some point and leave him to do what he wants, Lutalo said.

Uganda's police force said last week it would keep Besigye under house arrest until he promised to stop participating in the anti-government protests that have marred the country's image. A Ugandan court said that would be illegal.

Definitely, we will arrest him if he attempts to walk again, said Kaweesi on Monday.

Anne Mugisha, a senior official at Besieger's Forum for Democratic Change, said the security forces had beaten a group of students marching to Kasangati.

The senior police officer who declined to be named acknowledged the students had been blocked but denied the police had been heavy-handed.

The government has accused Besigye of seeking to plunge Uganda into lawlessness and exploiting the chaos to topple the government.

Dozens of opposition members have recently been rounded up by police for joining the protests, in which motorists and commuters abandon vehicles and instead walk to their workplaces.

Seven of those arrested have been charged with treason and three with concealment of treason.

In power for 25 years, Museveni was initially credited with restoring the rule of law and fixing a broken economy but analysts and opposition politicians have since accused him of becoming increasingly autocratic and seeking to be president for life.

Museveni blames the high consumer prices on outside pressures.

(Writing by Richard Lough)