Sounds of gunfire, anti-aircraft fire and explosions have intensified in Tripoli, Libya.
Residents have reported fighting in several neighbourhoods and said opponents of Muammar Gaddafi were in the streets.
But the Libyan government has said that 'Tripoli is safe and that armed people sneaked into Tripoli.'
Meanwhile, fuel shortages are expected to ease after Libyan rebels released stockpiles of oil in their newly won territory west of the capital Tripoli.
The rebels seized the refinery from Muammar Gaddafi's forces three days ago.
Heavy fighting for Zawiyah, a strategic city on the coastal highway 50km west of Tripoli, cut off regular deliveries for several days but truckloads of fuel have now arrived at petrol stations around the area.
Drivers formed long queues to refuel at petrol stations adorned with rebel flags.
The refinery's capture was seen as a strategic blow to Gaddafi's forces, which had relied on the plant for fuel.
Rebels have extended their control over Zawiyah, but pro-Gaddafi forces continue to shell parts of the city and are expected to launch counter-attacks to retake it.
Many residents had stayed indoors for days as fighting dragged on in the city and several other parts of the coastal strip in the past few days.
Rebels said the refinery was not running when it was captured from Gaddafi forces on Wednesday, but added that it appeared largely undamaged as most of the fighting inside the complex was with light weapons.
Elsewhere, rebels in Libya have been facing fierce resistance as they fight for two cities on the approaches to the capital, Tripoli.
Rebels said they had gained control of Zlitan, east of the capital, and were fighting to drive out the last pro-Gaddafi troops from Zawiyah to the west of Tripoli.
The International Organisation for Migration says it is planning to evacuate Tripoli of thousands of foreigners, as the fighting moves closer.
As they pushed to consolidate control of the city and its strategic oil refinery, rebels in Zawiyah's central square exchanged heavy fire with Gaddafi forces holed up inside a nearby hospital before driving them out, witnesses said.
Opposition forces fought bloody street battles in the city of Zlitan but suffered heavy casualties, with around 32 rebel fighters killed and 150 wounded.
Rebel advances have cut off Tripoli from its main supply routes, putting Gaddafi's four-decade rule under heavy pressure.
But Gaddafi's information minister, Moussa Ibrahim, said late last night that the government's military retained the upper hand in both Zawiyah and Zlitan and scorned what he described as 'bands of insurgents'.
Rebels have claimed that Gaddafi’s former deputy Abdel Salam Jalloud had defected to rebel-held territory in the Western Mountains.
Jalloud was a member of the junta that staged a 1969 coup bringing Gaddafi to power, and was seen as the state's second in command before falling out of Gaddafi's favour in the 1990s.
With rebels pushing on the ground, NATO has pressed on with its campaign from the air and its warplanes pounded targets in the capital overnight.
Gaddafi's government has blamed NATO bombings for scores of civilian deaths and said 27 people were killed in the most recent raids on Tripoli. NATO accuses Gaddafi forces of housing military assets near civilians.
More than 600,000 of up to 2.5 million foreigners, mostly Asian and African migrant workers, have fled Libya in six months of fighting. But thousands remained in Tripoli, which until this week was calm and a safe two-hour drive from Tunisia.
The route has been cut since the rebels entered Zawiyah, which lies on the coastal highway, six days ago.
Libyan oil minister fails to return from Tunisia
Libya's oil chief, Omran Abukraa, is in Tunisia after deciding not to return to Libya from a trip abroad, a Tunisian official source said, the third apparent defection this week of a senior figure associated with Muammar Gaddafi's rule.
The report, if confirmed, suggests more senior figures are deserting Gaddafi's government since rebels seized the city of Zawiyah, cutting off Tripoli from the outside world.
A senior security official, Nasser al-Mabruk Abdullah, flew to Cairo from Tunisia on Monday with his family.
Rebels said Abdel Salam Jalloud, Gaddafi's former deputy who is now out of favour with the leader, defected to their side on Friday.
Although Libya does not formally give its officials the title of minister, Abukraa represented Tripoli at an OPEC oil ministers' meeting in June.
He replaced Tripoli's long-serving oil chief Shokri Ghanem, who defected from Gaddafi's government and said he supported the aims of rebels trying to topple him.
US official claims Gaddafi's days are numbered
A senior US official claims that Libyan leaders Muammar Gaddafi's days are numbered as rebel forces make steady gains on the battlefield.
The United States has recognised the rebels' National Transitional Council (NTC) as Libya's legitimate authority. Feltman called on its leaders to uphold human rights and ensure an inclusive and representative government after Gaddafi goes.
They should work together now and plan to establish the rule of law, set up transparent and accountable institutions and provide safety and services.
Feltman has said that the US supported efforts by a UN envoy to negotiate a solution, but Gaddafi had yet to agree to the demands of Washington and others that he leave power.