Forces backing the Libyan unity government repelled the troops of eastern leader Field Marshal Khalifa Haftar on Sunday as they approached the gates of Tripoli after heavy overnight strikes.
The air strikes targeting forces from the internationally recognised government closed the capital's only functioning airport for several hours on Sunday.
Field Marshal Haftar ordered his Libyan National Army to take Tripoli from the Government of National Accord in an offensive he said was targeting militants and terrorists.
Tripoli’s Mitiga International Airport reopened to flights after several hours, airport authorities said on Facebook.
Earlier, Tripoli residents reported that explosions shook the capital late on Saturday after an air strike.
The overnight bombardment was an escalation of a two-week offensive by eastern forces on the city held by the internationally recognised government.
An aircraft circled for more than 10 minutes over the capital with a humming sound before opening fire on a southern suburb, the scene of the heaviest fighting between the rival forces.
The latest attacks were aimed at military positions in the capital’s southern Al Sabaa district, said Mohamed Younes, a spokesman for the Tripoli government.
Field Marshal Haftar launched his offensive on the capital two weeks ago, but the offensive has stalled on the outskirts of the city.
The violence increased sharply after the White House said on Friday that President Donald Trump spoke with Field Marshal Haftar earlier in the week.
The disclosure of the call and a US statement that it "recognised Field Marshal Haftar's significant role in fighting terrorism and securing Libya's oil resources" boosted the commander's supporters and enraged his opponents.
It was unclear why the White House waited several days to announce Monday's phone call.
On Thursday, the US and Russia said they could not support a UN Security Council resolution calling for a ceasefire in Libya at this time.
Russia objects to the British-drafted resolution blaming Field Marshal Haftar for the latest flare-up in violence when his LNA advanced to the outskirts of Tripoli this month, diplomats said.
The US did not give a reason for its decision not to support the draft resolution, which would also call on countries with influence over the warring parties to ensure compliance and for unconditional humanitarian aid access in Libya.
On Friday, two children were killed in shelling in southern Tripoli, residents said.
The fighting has killed 220 people and wounded 1,066, the World Heath Organisation said.
Both sides claimed progress in southern Tripoli on Saturday, but no more details were immediately available.
The capital has another airport, Tripoli International, which is closed.