Mutinous soldiers declared they were seizing power hours after it was announced Mr Ali Bongo had won 64% of the presidential vote, giving him a third term in office.
Opposition groups argued the result was fraudulent.
In the election, Mr Bongo faced an opposition coalition led by economics professor and former education minister Albert Ondo Ossa, whose surprise nomination came a week before the vote.
A group of nearly a dozen senior military figures made the announcement on the national TV channel Gabon 24.
They introduced themselves as members of The Committee of Transition and the Restoration of Institutions and said they represented all security and defence forces in Gabon.
The group’s members were drawn from the gendarme police force, the republican guard and other elements of the security forces.
The military leaders said election results were cancelled, all borders were closed until further notice, and state institutions dissolved.
Sounds of gunfire were reported in the Gabonese capital Libreville on Wednesday morning, but there did not appear to be significant signs of unrest.
Crowds in the capital took to the city’s streets to celebrate the end of Mr Bongo’s reign, singing the national anthem with soldiers.
Mr Bongo has been placed under house arrest following the coup.
Source: Sky News