Libyan rebels fighting to overthrow Col Muammar Gaddafi have taken control of two strategic coastal cities as they close in on Tripoli.
They seized Zlitan, 160km (100 miles) east of the capital, and Zawiya, about 30km west of Tripoli, following fierce battles on Friday.
The government denies rebel victories but BBC correspondents saw rebels in control of both cities.
Meanwhile, plans are being made to evacuate many foreigners from Tripoli.
A Qatar-based TV station linked to the rebels earlier broadcast a statement telling Tripoli residents to be ready for their arrival.
"Tripoli is the largest of our cities. Do not leave it to the scum. The rebels are coming," said the broadcast.
The BBC's Matthew Price, in Tripoli, says the rebel advance on two fronts has left the Gaddafi government on the ropes more than ever.
It demonstrates the rebels now have the capacity and training to push back pro-Gaddafi forces, who have been significantly weakened by Nato's airstrikes, our correspondent says.
The rebels also claim to have taken full control of the eastern port city of Brega but the rebels' claimed success there is unconfirmed.
After visiting Zlitan, the BBC's Orla Guerin said the rebels appeared to have a firm grip on the town, controlling the centre and manning checkpoints.
However, small-arms and mortar fire could still be heard, and rebels told the BBC that beyond a strategic bridge in the centre, there was still a risk of attack.
A rebel spokesman from Misrata, Munir Ramzi, said 31 rebels had been killed and 120 wounded in heavy fighting in the Zlitan area on Friday.
The city represents a key position in the path to Tripoli from nearby Misrata, which until recently was besieged by Col Gaddafi's.
In Zawiya, Hussein Azzwaik, an oil engineer involved in the uprising, told the BBC the rebels had "pushed Col Gaddafi's forces all the way out of Zawiya".
"We are just having a big celebration right now in the city centre," he said.
Capturing the town cuts the main road from Tripoli to Tunisia, severing the principal supply route for Col Gaddafi's forces.
On Thursday, rebel forces seized an oil refinery outside Zawiya, which supplied the government troops with fuel.
The BBC's Rupert Wingfield-Hayes in Zawiya says the rebels appear to have succeeded in pushing Col Gaddafi's forces out of the city.
He says the bodies of sub-Saharan Africans can be seen on the streets, amid claims by the rebels that many of those fighting for Col Gaddafi are foreign mercenaries.
However, Col Gaddafi's Information Minister Moussa Ibrahim said late on Friday that government troops had the upper hand in both Zlitan and Zawiya, and scorned what he described as "bands of insurgents", according to Reuters.
Rebel forces have also moved towards Tripoli from the south.
Nato, enforcing a UN-mandated no-fly zone to protect civilians since March, controls sea access to Tripoli.
Meanwhile, reports suggest fresh senior figures in the Gaddafi camp may have defected:
- Abdel Salam Jalloud, who helped Col Gaddafi come to power in 1969 but fell out with him in the 1990s, is believed to be making his way to Europe from neighbouring Tunisia
- Libyan Oil Minister Omran Abukraa failed to return to Libya on Thursday after a visit to Italy and went to Tunisia instead, Tunisian sources said
Libya's conflict broke out in February, inspired by uprisings in Tunisia and Egypt which toppled the presidents of those countries.
Rebels in the east rapidly consolidated their gains, but a stalemate developed in the west as rebels there faced overwhelming military force.
The fighting has stranded thousands of migrant workers - many of them Egyptians - in Tripoli.
The International Organisation for Migration (IOM) said it was planning to evacuate them in the coming days.
Since the conflict in Libya began, an estimated 600,000 migrant workers have fled the country, many with the help of the IOM, but many remain.
Rebels quickly consolidated gains in the east of the country, but until recently Col Gaddafi's forces held much of the west.