By Ayman al-Warfalli and Feras Bosalum
BENGHAZI Libya (Reuters) - Islamist militants attacked an army base in the eastern Libyan city of Benghazi on Monday, triggering fierce clashes involving helicopters and jets that killed at least seven people and wounded 40 others after days of escalating violence.
Benghazi's clashes followed a week of fighting between rival militias for control of Tripoli International Airport in the capital that has prompted the North Africa country to appeal for international help to stop Libya becoming a failed state.
Tripoli was calmer on Monday, but in Benghazi, militants linked to Islamist group Ansar al-Sharia attacked an army camp and were repelled by troops and forces loyal to renegade retired general Khalifa Haftar, who has been carrying out a self-declared war on Islamist fighters, security sources said.
"Ansar al-Sharia tried to take over one special forces camp, but the special forces and Hafter's forces fought back, using helicopters and military aircraft in their attack," one source said, asking not to be identified for security reasons.
Since the 2011 civil war that toppled autocrat Muammar Gaddafi, Libya's fragile government and new army have been unable to assert authority over rival brigades of former rebels fighting for political and economic influence.
Ansar al-Sharia is listed by Washington as a foreign terrorist organization, and has entrenched itself in Benghazi, where it has often been blamed for assassinations and attacks on soldiers.
Haftar, a former Gaddafi army officer who fled to the United States after breaking ranks with the Libyan leader, has launched a campaign on the Islamists in Benghazi, bringing to his side elements of the regular army and air force.
Tripoli's central government says he is acting without the authorization of the state. While his campaign is popular with many in the east, his forces appear to be in a stalemate over Benghazi for now.
In the capital, the clash over Tripoli airport in the last week has killed at least 47 people, the health ministry said, in some of the worst violence in the city since the 2011 civil war.
The clashes have stopped most international flights, damaged more than a dozen planes parked at the airport and prompted the United Nations to pull its staff out of the country due to security concerns.
The airport battle mirrors a broader standoff between rival factions competing for power in Libya, each claiming the mantle of rebel savior, each heavily armed and each demanding their share of the post-Gaddafi spoils.
The airport area is under the control of former fighters from the western town of Zintan who have held it since the fall of Tripoli in 2011. Rival Islamist-leaning militias allied with powerful brigades from the city of Misrata have fought with the Zintanis to dislodge them from the airport.
The Zintanis are loosely allied with more nationalist political forces while Misrata and various allied militias are tied to the Islamist Justice and Construction Party, a political wing of the Muslim Brotherhood.
OIL PRODUCTION CREEPING BACK
Three years since Gaddafi's death, the violence and militia rivalries have all but stopped the OPEC country's transition to full democracy as the government struggles to stamp its authority on a country where the state holds little sway.
Many of the former rebel brigades are on the government payroll as quasi-official security forces in a failed bid to bring them under control, but many are more faithful to political factions, tribes or even local commanders in a complex web of loyalties.
Libya's oil resources have often been targeted by different armed groups since 2011 to pressure the government for financial or political gain. Last year a string of protests slashed oil output to less than half the usual 1.4 million barrels per day.
In a rare success, a negotiated deal in April mostly ended a year-long blockade by a former rebel commander over four key oil ports, allowing the country to start slowly rebuilding production, shipping crude and earning vital oil revenue.
Libya state oil company National Oil Corp (NOC) on Monday reached a deal with security guards to end a protest at eastern Brega oil port, which is expected to allow the terminal to reopen on Tuesday, a company spokesman said.
Reopening Brega would allow the state-run Sirte Oil Company to start producing again and further boost Libya's output after the end to other port and oilfield protests. Late last week, NOC said production was around 555,000 barrels per day.
(Reporting by Feras Bosalum and Ayman Al-Warfalli in Benghazi; Writing by Patrick Markey; Editing by Louise Ireland and David Evans)