A series of suicide bombings in Libya has left at least 40 soldiers dead, as opponents and supporters of a former general clashed for control of a key air base in the port city of Benghazi.

Al Jazeera's Mahmoud AbdelWahed, reporting from Tripoli, said four separate suicide attacks targeted the Benina air base on Thursday killing at least 40 soldiers loyal to former General Khalifa Haftar and wounding dozens more.

"Fighting is ongoing around the strategic Benina air base, with militias seeking to capture the base before Eid on Saturday," he said.

Live Box 2014526124723906113

"The air base houses heavy weaponry and is crucial for the militias as they attempt to seize control of Benghazi."

The Shura Council of Benghazi Revolutionaries said it carried out the attack in conjunction with the Libya Shield brigade and Ansar al-Sharia.

Special army forces allied to brigades of Haftar have been fighting Islamist forces including Ansar-al-Sharia, blamed by the US for an attack on the US consulate in the city in September 2012 in which the US ambassador was killed.

Libya is being racked by violence as the armed groups which helped topple long-time ruler Muammar Gaddafi in 2011 have turned their guns on each other in a struggle to dominate politics and the country's vast oil resources.

The current crisis is rooted in the successive Libyan governments' dependence on those militias, originally anti-Gaddafi rebel forces, in restoring order in the absence of a strong national army or police.

Western powers worry Libya will become a failed state as a weak central government cannot control the competing armed groups in a country awash with arms.

Source: Al Jazeera and agencies