Black plumes of smoke marked shell blasts and bulldozed earthen barricades mapped out the frontlines around Tripoli’s largest airport, now at the heart of a standoff between the country’s powerful militias.

With barrages of Grad rockets, anti-aircraft guns and artillery fired at their rival enclaves just kilometres apart, brigades of former rebels have turned parts of southern Tripoli in a battleground for nearly a fortnight.

The clash over Tripoli International Airport is the latest eruption in a deepening rivalry among bands of ex-fighters who once battled side by side against Muammar Gaddafi, but have since turned against each other in the scramble for control.

Since the 2011 fall of Tripoli, fighters from the western town of Zintan and allies have controlled the area including the international airport, while rivals loyal to the port city of Misrata had entrenched themselves in other parts of the capital.

Heavily armed, they have refused to hand over their guns and sided with competing political forces trying to shape the future of Libya in the messy transition since Gaddafi’s four-decade rule over the North African state.

Libya’s government on Friday urged the two broad factions to sit down for talks, and negotiators were trying to broker a ceasefire between the groups which have become de facto powerbrokers in post-Gaddafi Libya.

‘‘We call the people of Zintan and Misrata to urgent talks with the government to resolve this crisis and work out an initiative to settle this at once,’’ Prime Minister Abdullah al-Thinni’s office said.

Deep divisions, however, were clear along Tripoli’s empty airport road, where burning grasslands smoked from recent shelling. Sporadic artillery and anti-aircraft fire could be heard booming out from the airport toward southern Tripoli.

Outside on the highway, Zintani fighters were dug in to defend the airport they say they are officially sanctioned to protect as part of Libya’s armed forces. Young fighters in Toyota trucks mounted with canons guarded the road.

‘‘They are strong and we are strong,’’ said Mohammed, a Zintan fighter inside the airport terminal, which has been damaged by shelling. ‘‘When we fought Gaddafi’s army, they did not resist more than two hours. Now we are fighting for ten days and no one has won.’’

Inside the main terminal, debris was scattered across the floor of the passenger area, where a hole has opened in the ceiling from a shell hit. An empty wheelchair sat among rubble in the check-in area packed with travellers just weeks before.

Clashes over Tripoli’s airport involving heavy weapons have killed around 50 people and made parts of Tripoli look like they were caught in a civil war once again.

In one southern Tripoli neighbourhood, earthen barriers closed off roads where militias had marked the frontline. Burned-out cars and bullet-pockmarked walls were evidence of recent clashes.

Three years after Gaddafi’s fall, Libya’s fragile transition to democracy has often been battered by infighting and militia violence as armed groups use military muscle to make demands.

With no real national army, Libya’s government has recruited former fighters as quasi-official security forces, but loyalties are often stronger to region, tribe or local commanders.

Armed groups have also targeted Libya’s oil industry, shutting oilfields and ports to give their demands more weight.

Western governments, worried over Libya’s chaos spilling across its borders, have urged a militia ceasefire and pushed for a settlement to be worked out within a newly appointed parliament, due to take office in August.

But the previous parliament, known as the General National Congress, was deadlocked for months by infighting between Islamist and nationalist factions. Rival militias attacked the parliament several times to pressure for demands.

After days of on-and-off shelling and rocket fire, Tripoli appeared quieter by Friday night. But after weeks of clashes, the two sides maybe more polarised than before.

Zintan brigades and their Tripoli allies — the QaaQaa and al-Sawaiq units, including some ex-Gaddafi forces who rebelled — are loosely associated with the nationalist National Forces Alliance movement in the former parliament.

Opposing them are a range of Islamist-leaning militias led by Misrata forces, tied to the Justice and Construction Party, an arm of Muslim Brotherhood. Like Zintan, they also claim to be a legitimate forces and inheritors of the 2011 revolt.

‘‘I don’t know if there will be peace between Misrata and Zintan, but I don’t want any civilian lives lost,’’ said another Zintan fighter named Ahmed. ‘‘But I do know they just really want to take this airport from us.’’