RAS JDIR, Libya (Reuters) - His Kalashnikov across his back, Libyan soldier Adel Howas rushed to the front line when air strikes targeted his comrades at a border crossing with Tunisia.
For Howas, it was a return to familiar territory from 2011 when he joined rebels in a NATO-backed uprising to topple Muammar Gaddafi.
But where Howas once fought Gaddafi loyalists on the coast road to the capital, the grizzled veteran now finds himself defending the same route against former comrades-in-arms using jets to seize Tripoli.
In the messy transition since Gaddafi's demise, Libya is bitterly divided between two rival factions of former rebels who have established competing governments and parliaments in a complex struggle for control of the North African state.
Each faction claims the mantle of liberators, each brands its fighters the true army and each seeks international recognition in a conflict Western powers and African neighbours fear will split Libya in half.
"I came here with other revolutionaries to protect this crossing," Howas said, wearing a uniform with a "Libyan Army" tag. "I have volunteered to fight. We are with the law and democracy. Those are criminals bombing us."
Bullet-marked buildings along the border are testimony to the 2011 revolution. But fresh damage from air strikes this week shows how Libya is descending into a bitter split reminiscent of the anti-Gaddafi uprising.
One faction, Libya Dawn, seized Tripoli and much of western Libya in August by expelling rivals allied to the western region of Zintan. They set up a self-declared government, took over ministries and reinstated a former parliament.
Tripoli's takeover forced Prime Minister Abdullah al-Thinni's internationally recognised government and the newly elected parliament to operate out of the east of Libya, controlling only a small rump of the vast desert country.
Thinni calls Libya Dawn "terrorists" undermining democracy. He has teamed up with former anti-Gaddafi rebels from Zintan and a retired army general, Khalifa Haftar, who commands several aircraft and a number of army units.
They have merged into the "Libyan National Army" (LNA), using air strikes to try to take the Ras Jdir border crossing from Libya Dawn's "Libyan Army" forces.
But the border skirmish is just one front in a conflict Western governments fear might break the OPEC oil producer apart. Around 800km (500 miles) to the east, Dawn factions have started another offensive to seize eastern oil ports.
Fighting is already hitting crude production. Attempts to seize the Es Sider and Ras Lanuf petroleum terminals have forced their closure and shut off 300,000 barrels a day of export capacity.
At the Ras Jdir border point, Howas and his comrades have
held the crossing and the Tripoli road despite LNA air strikes.
"We're securing the border. It's all fine here. 100 percent," said another fighter loyal to Dawn who gave his name as Haitham, while helping to direct traffic at the border.
But the Zintanis, based in their mountain hinterland, are close by, holding positions sometimes just 20 km (12 miles) from the coast road. Border traffic at one point zigzags in a short detour around the front line.
Dawn brigades have brought in Grad rocket launchers and Toyota trucks mounted with anti-aircraft guns to fight off the Zintani forces. Ambulances stand ready while some fighters burn logs to make tea.
In Ras Jdir's administrative office orders posted on the door call on all staff to report for duty due to the "100 percent security readiness".
Down the road, small flags next to a chemical plant mark the site of an air strike.
Libya's conflict pits communities from coastal cities such as Misrata against tribes in the east and western mountain areas such as Zintan, a rivalry going pre-dating Gaddafi and masked by the fight against the strongman.
The United Nations, backed by the European Union, is trying to broker a second round of talks. But weeks of negotiations have struggled to bring the factions to the table.
Meanwhile the conflict draws in more communities, and effectively divides the desert nation. Tribal alliances are complicated by rivalries among ex-Gaddafi forces, Islamist factions and nationalist brigades.
Reinforcements at the Tunisian border post come from the Amazigh, or Berber, minority, many of whom have joined forces with Dawn. Their territory overlaps with the Zintanis, splitting western Libya in some areas village by village.
But in the east and south, the LNA has won support from the Tebu, another minority. But their rivals, the Tuareg, also in the remote south, back Dawn, helping to secure El Sharara oilfield after Zintani forces pulled out.
"We need unity, not divisions," said Mustafa Mohamed, a driver from the Warshefana area near Tripoli, whose house was destroyed in recent fighting. "There is just one Libya, not one for the west and another for the east."
Editing by Patrick Markey and Giles Elgood