Johannesburg: The president's office of the Republic of Burundi took to Twitter to deny there had been a military coup on Wednesday and again, later, to announce it had survived it.

After a top general announced on radio that President Pierre Nkurunziza had been overthrown, the presidency tweeted that there was no coup and the situation was under control. It then tweeted again, tagging several journalists, stating the attempted coup had failed.

A protester stands in front of a burned barricade during a protest against Burundian President Pierre Nkurunziza's decision to run for a third term in Bujumbura, Burundi on Wednesday. Credit:Reuters

The presidency then issued a statement on Facebook, declaring the coup to be "fanciful" and announcing those responsible would be arrested and face justice. It said steps had been taken to maintain national security and called for calm.

It was not clear as night fell who would end up in control of the nation.