A car bomb targeting a military academy in Libya's restive eastern city of Benghazi has killed at least eight soldiers and wounded 12 others, military and hospital sources said.

The medical centre in Benghazi reported that "five bodies plus an indeterminate number of body parts" had arrived at the hospital, along with "more than 10 wounded people". It was not immediately clear where other bodies were taken.

A military source said the car parked in front of the academy blew up as soldiers emerged from an awards ceremony for army promotions.

Benghazi, cradle of the 2011 uprising that toppled veteran Libyan leader Muammar Gaddafi, has seen near-daily attacks on security and other targets in recent months as the weak central government struggles to rein in former rebel brigades turned militias.

The assailants have not been identified, nor claims of responsibility made for the attacks, reported the AFP news agency.

On December 22, a suicide car bombing targeting a security post 50km from Benghazi left 13 dead.

Fighters have also attacked foreign missions in Benghazi, including a September 2012 assault on the US consulate in the Mediterranean city that killed the ambassador and three other Americans.

On March 2, gunmen shot dead a French engineer in Benghazi.

Eastern Libya has become a bastion of armed groups, with authorities avoiding a full-blown confrontation with heavily armed former rebels pending the formation of a regular army and police force.

The government has struggled to consolidate control in the vast and mostly desert country, which is effectively ruled by a patchwork of local militias and awash in heavy weapons looted from Kadhafi's arsenals.

Source: Agencies