Libyan rebels continued to fight two major offensives Sunday in their drive towards Moammar Gadhafi's stronghold of Tripoli, pushing from the west and the south.

The rebels are still in battle with government troops in western mountain city of Zawiya after reports on Saturday said fighters had reached the city centre  and were joined by residents.

Loud booms and sporadic gunfire could be heard in parts of the city of 200,000 — a key town on the highway linking Tripoli to neighbouring Tunisia.

On Sunday, the Libyan government maintained it still controls the city. Zawiya's fall would cut the government off from the outside world.

Rebels erected many checkpoints inside parts of the city and on the road leading to it from the west. They have captured the bridge leading out of the city towards Tunisia.

Soldiers quashed an earlier uprising in Zawiya in March, which is largely sympathetic to the rebels.

Town in south still in contention

Zawiya, only 50 kilometres from the capital, suffered greatly in the March crackdown. The government razed a central mosque that was used by rebels as a makeshift hospital during the uprising.

Fighters from Zawiya fled into the farmlands surrounding the city, laying in wait for other rebels to join them to re-take the city.

And 80 kilometres south, rebels are fighting to re-claim Gharyan after declaring they had control late Saturday into the early hours of Sunday as Ghadhafi's soldiers withdrew.

Al-Jazeera reports that government forces returned several hours later and battles are continuing for Gharyan.

The town lies at the northern end of the Nafusa Mountains and Gadhafi's hold on the town is the only obstacle for rebels who have taken control of most of the range.

Libya's revolt began in February, with the rebels quickly gaining control of most of the eastern half of the country, as well as pockets in the west.  Soon, the insurrection fell into a stalemate with the rebels failing to budge the front lines in the east since April, despite an air campaign by NATO countries, including Canada.

The assault from Nafusa is an attempt to try to circumvent the deadlock.

At the main front in the east, rebels fighting Gadhafi's forces claimed they captured part of a strategic oil terminal city of Brega that has repeatedly changed hands.

With files from The Associated Press