Ask people in Benghazi what awaits them if Muammar Gaddafi's army fights its way back into the rebel capital and the chances are they will talk about Huda Ben Amer.

Today she is one of the Libyan dictator's most closely trusted lieutenants, but nearly 30 years ago Ben Amer was a young woman in Benghazi keen to earn a name with the regime.

Her moment came at the public hanging of one of Gaddafi's opponents in 1984. Ben Amer rushed forward as the man dangled from the rope, wrapped her arms around his body and used her weight to pull down until he was dead.

That stomach-churning performance won her Gaddafi's attention, and Ben Amer rose to become powerful, rich and twice mayor of Benghazi. It also earned her the enduring hatred of many in a city long viewed by the regime as riddled with subversion, where she is spoken of with the same depth of loathing and fear as the dictator.

"If we lose, Huda Ben Amer will hang all of us," said Walid Malak, an engineer turned revolutionary who has armed himself with a Kalashnikov plundered from a military base abandoned by Gaddafi's forces. "Everyone in Benghazi knows it's them or us."

That refrain is increasingly heard across the capital of a revolution that for a while looked as if it might sweep Gaddafi from power within days.

Now, with rebel forces in retreat and Tripoli's army moving closer by the day, the euphoria and expectation of initial uprising have given way to a grim realisation that it is the revolution which is now under threat and Benghazi may soon be fighting for its life.

Yesterday the head of Libya's revolutionary council, Mustafa Abdel Jalil, warned that, if Gaddafi's forces reach the country's second-largest city, "this would mean the death of half a million".

That may be hyperbole designed to whip up international support for the rebels, but Jalal Tuwahni, a clothing shop owner who returned from self-imposed exile in the US last year, regards the revolution as a fight to the death.

"People know if he comes back they will all die. Everybody in Benghazi has something to do with this revolution ... everybody is doing something."

Hundreds of young men, some still in their teens, have grabbed guns and made for the front line against Gaddafi's forces.

"The fear barrier is broken," said Salem Langhi, a Benghazi doctor who volunteered to treat rebel fighters on the front line.

But it has not proved enough to stop the advance of Gaddafi's forces and Benghazi looks woefully underdefended.