* First bomb blew up as soldiers leaving graduation ceremony
* Another car bomb killed one person near a state oil firm
* Weak central government struggling to control armed groups (Updates number of wounded in paragraph 3)
By Ayman al-Warfalli
BENGHAZI, Libya, March 17 (Reuters) - A powerful car bomb attack targeted a military academy in Libya's eastern of city of Benghazi on Monday, killing at least eight people and wounding more than a dozen, hospital and security officials said.
Instability in the eastern city is part of the struggle a weak central government faces in controlling armed groups, militias and brigades of former rebels who once battled Muammar Gaddafi and now refuse to disarm.
A first bomb exploded at the front gate of the academy as soldiers were leaving a graduation ceremony, security officials said. Several cars parked outside exploded. One or two other bombs exploded around the same time, wounding 18, security and hospital officials said.
In a separate explosion hours later in Benghazi, one person was killed when another car bomb went off near the state oil firm Brega Petroleum Marketing Co, which sells fuel products inside Libya, a security source said.
No group claimed responsibility for the bombings in Benghazi, where Libyan armed forces have been battling militants from hardline Islamist groups such as Ansar al Sharia, listed as a foreign terrorist organisation by Washington.
The government called the academy bombing a "terrorist act" and declared three days of mourning, according to a statement.
Most countries have closed their consulates in Benghazi and some foreign airlines have stopped flying there since the U.S. ambassador and three other Americans were killed in an Islamist militant attack in September 2012.
Gunmen killed a French citizen earlier this month, while police found seven Egyptian Christians shot dead execution-style on a beach outside Benghazi, home to several oil firms. No one has claimed responsibility for that killing.
An American schoolteacher was also killed by gunmen in December. Western diplomats are concerned the violence in Benghazi will spill over to the capital, Tripoli. (Reporting by Feras Bosalum and Ayman Al-Warfallim; Writing by Ulf Laessing and Patrick Markey; Editing by Alison Williams)
Our Standards: The Thomson Reuters Trust Principles.