Libya rebels are tightening the noose on Tripoli, the stronghold of Libyan leader Muammar Qaddafi, who could soon be forced to choose between stepping down or making a final stand by defending his capital. But while rebels have considerable momentum, a fight for Tripoli could well be protracted – and rebel gains have been swiftly reversed in the past.

The Associated Pressdescribed the rebels' current position as "the strongest position to attack [Qaddafi's] stronghold since the 6-month-old civil war began." As of Monday, the rebels were fighting for control of refineries and were reportedly in control of Tripoli's key supply routes and oil pipelines, with the ability to completely isolate the capital.

Desperation was evident: Tripoli residents streamed out of the capital city by car to the western mountains, while in the east Qaddafi's forces fired a Scud missile for the first time. It fell 50 miles short of the oil town of Brega, its likely target.

Rebels claim to have cut off all four pipelines that transport gasoline and diesel to Tripoli. They also claim to be on the verge of cutting the city off from the two remaining supply routes (critical for the city because of the NATO-imposed no-fly zone), although neither assertion could be confirmed, the AP reports. Monitor reporter Dan Murphy noted yesterday that the supply line from Tripoli to Tunisiais critical to Qaddafi's survival.

The gains have prompted a flurry of rumors about Qaddafi seeking an exit strategy and accelerated talks with rebel representatives. While it doesn't appear that a negotiated end to the fighting is at hand – and Qaddafi was his usual defiant and threatening self in an audiotape broadcast yesterday – if his forces can't open a route between the capital and Tunisia, the end of his rule becomes a matter of when, not if.

Gaddafi will throw all the men and weapons he has left into a defence of the capital, civilian casualties in urban fighting will be high, and sections of the population in Tripoli are likely to oppose the rebels.

Even if Gaddafi's opponents were able to win that fight, the bloodshed would create grievances and vendettas which could make the capital -- and maybe even the country -- ungovernable.

"Any fight for Tripoli can be expected to be extremely bloody," said David Hartwell, North Africa and Middle East analyst at IHS Jane's, a defence and security consultancy.

"My guess is the strategy is to isolate the capital and start applying pressure ... They (the rebels) seem to be trying to cut the links to the capital, one assumes with the aim of not having to assault the capital."

The current situation could go three ways, according to Reuters: Qaddafi supporters, starved of fuel and other supplies, could surrender or join the rebels; clandestine opposition members in the city could revolt; or Qaddafi could negotiate an exit deal.

But even if the rebels were to hold on to Zawiyah, it remained unclear when the conditions for the fall of Tripoli could materialize. There have been few meaningful signs that residents of the capital, who were the target of a crackdown during the early days of the uprising, are ready to revolt, said Geoff Porter, an analyst at North Africa Risk Consulting.

“The rebels’ military capacity and their ability to fight is getting better, but strategically they are still pretty disorganized,” he said. “Without taking Tripoli, there’s not as much impetus for Gaddafi to leave. He won’t leave voluntarily, and the rebels won’t be able to take Tripoli. It doesn’t seem we’re at the breaking point.”

How long it would take to get to the breaking point is anyone's guess, Murphy writes.

Qaddafi's steady loss of territory is making his defeat look inevitable, but it's hard to say how long he can hold out in Tripoli. To answer that question, you'd have to know precisely how much fuel, food, and ammunition he's got stockpiled. Some mind-reading skills or excellent intelligence would also be in order. While Qaddafi, his sons, and his closest aides have little to lose by fighting on, the same could not be said for second-tier regime figures. Will they be pushed to cut deals behind Qaddafi's back by the fear that it will be too late for them to secure their own futures if Tripoli falls to the rebels?

Lack of knowledge on those factors creates a situation where the fall of Tripoli could be days away. Or, it could be months away. What's certain is that the rebels' Western offensive has been a raging success in the past few weeks, and Qaddafi's long-term prospects are growing darker.