"The judge ordered that the state and its agencies should immediately vacate his property." Photo: Courtesy.

A day after the court ordered an end to the house arrest of the Uganda opposition leader and pop star Bobi Wine, soldiers have finally left the premises after days of standing guard outside. The musician turn politician whose real name is Robert Kyagulanyi had been under a house since the start of the country’s general election on January 14 where long-serving President Yoweri Museveni was declared the winner. The withdrawal of security forces, which the government had said were for Wine's own protection, complied with a court order released early this week after several attempts to end the house arrest proved futile.

READ ALSO: Bobi Wine speaks out on why he evacuated family to US ahead of election

"The judge ordered that the state and its agencies should immediately vacate his property and his right to personal liberty should immediately be reinstated," lawyer George Musisi told Reuters.

For 11 days heavily armed soldiers and police officers surrounding the property had prevented members of Wine's household, including his wife Barbie, from leaving their compound, as well as denying access to visitors.

"I was put under illegal detention in my own house because General Museveni did not win," he said, referring to long-running President Yoweri Museveni adding that "He is staging a coup against the will of the people of Uganda."

Wine went on to reveal that police helicopters were seen hovering in the sky above his home, while local law enforcement manned a single road checkpoint near his residence.

“This has been the situation at my house these past days. Aside from the military and police surrounding us, military and police helicopters have been consistently hovering over our residence in breach of our privacy rights. Cowards! #WeAreRemovingADictator,” he tweeted.

READ ALSO: Bobi Wine's 18-month-old niece 'safely evacuated'

However, the Ugandan government still insisted that the restrictions on Wine's movements were preventative measures for his own protection and to prevent protests against the election result, which delivered Museveni a sixth term.

"It is true that police and other security agencies are around his premises ... outside, not inside his home, but that is basically to ensure security in the area. He is not under arrest. We have just provided security in the area. Nothing much," Kampala Metropolitan Deputy Police Spokesperson Luke Owoyesigyire told the press.

Via Twitter, Bobi Wine had been communicating to the world the situation at his residency. He revealed that he was trapped with 18 months old whose food had run out. She was later evacuated.

"Day Six under house arrest and we're still stuck with an 18 months old baby who had paid a visit to her auntie (my wife) be4 we were raided & besieged. The dad has been denied access to her. We have run out of food and milk. No one is allowed to leave or come into our compound," he wrote at the time.