The government has now declared it still holds power.
Government spokesman Guy-Bertrand Mapangou told Radio France International that the five officers involved were arrested in the capital Libreville on Monday.
Obiang was the last of five members of the group to be arrested Monday.
A fifth officer fled and is being searched for, he said.
"We can not abandon our homeland", he said.
He promised to put all of his efforts into improving the quality of life of Gabon's people.
Calling on Gabon's citizens to support the coup, Ondo Obiang said, "If you are eating, stop; if you are having a drink, stop; if you are sleeping, wake up". Two more soldiers were involved in taking control of the national radio station.More news: Apple warns investors to expect weaker profit, blaming China's worsening economy
Bongo addressed the Gabonese people in a televised message on New Year's Eve, saying he had been through a hard period.
"The situation is under control", the presidency statement said.
In a New Year message from the Moroccan capital Rabat, Bongo said he will return home soon.
But a section of the populace was unimpressed by the video as the president was said to have slurred some of his words and his right arm remained immobile throughout the speech.
Gabon's oil production in November was 176,000 bpd, down by 11,000 bpd compared to October, according to OPEC's latest Monthly Oil Market Report (MOMR).
Gabon is now being run by the prime minister and vice president after the Constitutional Court transferred some of the president's power in his absence.
Bongo had said in a video message from Morocco that he had gone "through a hard period", but is preparing to meet his countrypeople again soon.