Rebels fighting their way towards the Libyan capital have captured an important military base just 22km (16 miles) west of Tripoli.
They seized weapons from the base, identified as a barracks of the elite Khamis Brigade, commanded by a son of Col Muammar Gaddafi.
Earlier, the rebels suffered a reverse at Maya, 35km west of Tripoli, as artillery attacks forced them back.
The Gaddafi government has called for talks to end the conflict.
In Tripoli, support for Col Muammar Gaddafi remains strong, correspondents say. But new gunfire and protests were reported in Tripoli on Sunday, following fierce clashes in several districts overnight.
Rebel forces have advanced from the east and west in recent days, backed by Nato aircraft ostensibly enforcing a UN resolution to protect civilians from Col Gaddafi's forces.
Critics accuse the organisation of overstepping its mandate by helping the rebels.
An Associated Press reporter with the rebels saw them take over the military base and drive off with lorryloads of fresh supplies. The capture of the base was confirmed by an AFP reporter, also with the rebels.
AP identified the site as a base of the Khamis Brigade, one of the best trained and equipped units in the Libyan military, commanded by Khamis Gaddafi.
Earlier on Sunday, rebels advancing from the west captured the town of Jaddayim but after pushing on to Maya, 35km west of Tripoli, they were forced back by pro-Gaddafi forces with heavy artillery.
They were met with very heavy incoming fire and ran back along the road, setting up a new front line a few kilometres out of the town, the BBC's Rupert Wingfield-Hayes reports.
The rebels do not have heavy artillery and when they come up against Grad rocket launchers, for example, they do not have much to defend themselves with, our correspondent at Zawiya adds.
After the reverse at Maya, Nato reportedly launched air strikes in the area, and it was not immediately clear whether the rebels had regained Maya before pushing on to the Khamis base.
In the capital itself, four loud explosions were heard on Sunday morning followed by intermittent small-arms fire
- While the source of the blasts and gunfire was unclear, rebel sources and witnesses told news agencies that clashes were under way between rebels and government supporters in the eastern neighbourhoods of Soug Jomaa, Arada and Tajoura
- Unconfirmed rebel reports say a group of rebel fighters slipped into Tripoli by sea from Misrata and engaged pro-Gaddafi forces in Tajoura
- Snipers on high buildings were firing on protesters in at least one area, rebel commander Mukhtar Lahab was quoted as saying by AP. The agency added that residents contacted in the city by telephone also reported snipers firing on civilians
- Witnesses told the AFP news agency that local people had taken to the streets late on Saturday, setting tyres ablaze, while calls urging the population to rise up were made from the loudspeakers of mosques
The overnight fighting almost certainly involved opponents of Col Gaddafi already in scattered parts of Tripoli rising up against pro-Gaddafi forces, rather than rebel forces advancing into the capital, the BBC's Matthew Price reports from the capital.
Government officials said clashes in the city on Saturday had been put down within half an hour, and Col Gaddafi congratulated his supporters for repelling rebel "rats", while his son, Saif al-Islam, ruled out any possibility of surrender.
In another development, a Maltese ship heading for Tripoli to pick up refugees came under fire and could not dock in the port, Polish foreign ministry officials said, without specifying where the fire had come from.
Information Minister Moussa Ibrahim accused Nato of "opening the roads ahead of the rebels who are too weak to do anything themselves".
He also accused the rebel forces of massacring people in towns and villages seized in recent days, and warned of "many" deaths and "terrible crimes... inside Libyan cities".
Tripoli, he insisted, was well protected by "thousands upon thousands of professional soldiers".
At the same time, he urged the rebels to open talks. "If you want peace, we are ready," he said.
A UK Foreign Office spokesman responded to Mr Ibrahim in a statement, saying: "Our overriding priority has always been to protect Libyan civilians and to enable them to choose their own future. Nato action will continue whilst a threat to civilians remains."
The Libyan leader certainly has support in Tripoli, our correspondent there says. Pro-Gaddafi men and women have received weapons training in recent weeks, while checkpoints have sprung up across the city.
On Saturday, the rebels announced they had been forced back in the east by government artillery in the oil port of Brega.
Brega, home to Libya's second-largest hydrocarbon complex and where oil from the country's main fields is refined, has repeatedly changed hands during the conflict.
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.