Wine and other opposition candidates were often harassed, and more than 50 people were killed when security forces quashed riots in November over Wine’s arrest.
The 38-year-old petitioned the International Criminal Court this month over alleged torture and other abuses by security forces.
While the president holds on to power, at least 15 of his cabinet ministers, including the vice president, were voted out, with many losing to candidates from Wine’s party, local media reported.
Wine claimed victory Friday, asserting that he had video evidence of vote-rigging and saying “every legal option is on the table” to challenge the official election results, including peaceful protests. Candidates can challenge election results at the Supreme Court.
Hours later, he tweeted that the military had entered his home compound and “we are in serious trouble,” which a military spokeswoman denied.
Wine, whose real name is Kyagulanyi Ssentamu, was roughed up and arrested several times while campaigning but was never convicted. He campaigned wearing a flak jacket and said he feared for his life.
A heavy presence of security forces remained around his home, where he has said he was alone with his wife and a single security guard.
Uganda’s electoral commission has said Wine should prove his allegations of rigging, and it has deflected questions about how countrywide voting results were transmitted during the internet blackout by saying “we designed our own system”. The body could not explain how the system worked.
Uganda’s elections are often marred by allegations of fraud and abuses by security forces. The previous election saw sporadic post-election riots.