A Ugandan High court has ordered the military and police to leave the home of opposition politician Bobi Wine following a petition by his lawyer.
The ruling was delivered at the high court in Kampala early hours of Monday.
He has not left his house in the outskirts of the capital Kampala since voting in the presidential election 11 days ago, in which he was declared runner-up to President Yoweri Museveni.
Justice Micheal Elubu told the court it that the house arrest was an “an infringement on his personal liberties” thereby ruling his detention unlawful.
The BBC’s Patience Atuhaire in Kampala says armed police and soldiers have been stationed outside Bobi Wine’s residence, not allowing anyone in or out.
Several more have been patrolling the neighbourhood.
The state argued it needed to prevent him from organising protests.
Army spokesperson Brigadier Flavia Byekwaso has told the BBC that the security agencies will respect the court order.