Mr Museveni, who rose to power through a rebellion, has been ruling Uganda since 1986.
The protest was taking place at City Square, Kampala.
“No way anybody can come and play around with our country to say ‘it is good, it is bad’ we will stop this one, we cannot accept that.”
Although the internet is now on, social media is still blocked.
“The AU surely can do more than pay lip service while the continent reels under aging and unproductive dictators.”
It is not immediately clear how the opposition would challenge the results.
The NUP leader said he would speak in detail about these irregularities as soon as the internet was restored.
The electoral process has been marred by fraud and violence.
The list of banned social media sites include Facebook, Twitter, WhatsApp, Signal and Viber.