Uganda blocked social media sites including Twitter, Facebook and WhatsApp before the swearing-in ceremony on Thursday of President Yoweri Museveni, whose re-election sparked protests and a crackdown on dissent.
Museveni, 71, officially won 60 per cent of the vote in February, allowing him to take on another term and extend his rule to 35 years. The opposition cried foul and protests broke out, leading to some clashes with police and dozens of arrests.
Godfrey Mutabazi, executive director of the telecommunications regulator, said security agencies had requested the move as "a measure to limit the possibility of terrorists taking advantage" of visits by dignitaries. Uganda is hosting several heads of state for the ceremony.
The authorities blocked social media during voting and shortly afterwards, a move criticised at the time by the United States and rights groups, who said it undermined the integrity of the process.
The government had also banned any live television or radio coverage of protests.