BENGHAZI - Even as the votes to take on the Libyan regime were cast yesterday, the battle for Benghazi had begun. Colonel Muammar Gaddafi's warplanes carried out strikes on the city as artillery volleys started to come in from units approaching from several directions.
The skies above were lit up by constant streams of anti-aircraft fire. Rebel fighters, buoyed by reports that the vote in New York had gone for military action, began to stream towards the western gates of the city.
Even as the violence flared they believed that, at last - a month to the day after Libya's revolution began - their only realistic hope of avoiding defeat at the hands of the regime had come true.
But there is a fierce battle ahead. The firefights took place with the constant background sound of mosques in the city playing chants of "Allah hu Akhbar" at high decibel through loudspeakers.
The chant was taken up by the rebel fighters, the Shabbaab, as they traded fire. Many of the exchanges were chaotic with heavy-calibre guns used at random. Flames appeared in parts of the city with black smoke blending into the night sky.
Down below, however, Benghazi was a bright target for the warplanes. No attempt had been made to dim the lights in any of the public buildings in the centre and residential areas also lit up as people came out to windows and balconies to watch the action, with some of the women ululating.
The mood of the rebel fighters, who had suffered repeated defeats in recent weeks and had been forced to withdraw from town after town, was buoyant. As he manned his anti-aircraft gun, Selim Astersi shouted: "The devil Gaddafi wants to come into Benghazi, we shall throw him back. Tonight we shall prove ourselves. We shall avenge all those he killed."
Khalid Ibrahimi stopped his truck, carrying five fighters in the back, to ask: "Is it true that they have voted [at the UN] yes? That is what we needed, my brothers, we have got help at last."
At just after 1am local time, two explosions echoed through the waterfront followed by machine-gun fire. Shabaab fighters claimed infiltrators had come into the city but it seemed more likely that some ammunition had detonated.
The firing began to subside at around 2am, amid claims that Gaddafi forces had retreated. Rebel fighters continued to fire anti-aircraft rounds into the air despite there being no discernible presence any longer of warplanes.
Several hundred members of the revolutionary forces gathered at the edge of the city and many of them headed off down the road west in pursuit of the enemy.
As the city erupted in chaos, it was easy to forget that not long ago the war was 80km away. The rebels had spent the day in shifting moods, watching the conflict edge ever closer: by turns defiant - or cowed and confused. Sometimes they fought, but mostly it was a long retreat forced by barrages from land and air by Colonel Gaddafi's forces.
As the withdrawal has continued, there has been deep bitterness in Benghazi at what was seen as the West's indifference to the suffering inflicted by the regime. But the news that the UN was considering air strikes led to cheering in cafes where customers were glued to TV news.
A top official of the rebels' transitional national council, Ali al-Essawi, welcomed the resolution. "We think that this resolution ... will mark the end of the impunity and dictatorship of Gadhafi," he told the Associated Press in the Benghazi.
Rebel National Council head Mustafa Abdel Jalil told Al Jazeera television air strikes, beyond the no-fly zone, were essential to stop Gaddafi.
"We stand on firm ground. We will not be intimidated by these lies and claims ... We will not settle for anything but liberation from this regime."
In Tobruk, east of Benghazi, happy Libyans fired weapons in the air to celebrate the vote.
Back in Benghazi, the sighting of two foreign frigates heightened expectations. In the event the warships did not intervene during two air strikes yesterday, both aimed at the airport which was already inoperable because of bombings.
A plane went down, an "enemy aircraft" destroyed in battle, according to claims by the rebels and the regime. Or it may have been, as an official inadvertently disclosed, one of the two which comprises the opposition's air force, hit by friendly fire.
The capital of "Free Libya", meanwhile, continued its fractured lifestyle. Marches celebrating the anniversary took place, alongside chants for democracy. Cars were heading out of the city, with families piled inside with their belongings, as gunfire echoed around the perimeters of the city.
A few of the rebel leadership have slipped away. Some of the ones who remained repeated the now familiar mantra that Benghazi will be saved, Colonel Gaddafi's troops would be thrown back, that there was a military plan in place for this.
That was the one remaining hope of the rebels falling back to Abdullah Athi yesterday. "We could not hold our position ahead, I do not know whether we can hold here, it is too exposed," said Ashraf Faraz Ali. "But we will have better defences in Benghazi. We are prepared there."
But there was no discernible evidence of this in Benghazi, no sign of defences being prepared for the coming onslaught - and whatever the UN has said, the rebels were still fighting on their own last night. The young fighters at the checkpoints into the city were jittery. "We went to the front, but they turned us back", 19-year-old Mohammed Akhoki gulped nervously.
"They said that our rifles would be no match for the heavy weapons of the Gaddafi men. But we would rather face them out there, when they were some way off. We have been told we must not let them into Benghazi. So we will fight and we will probably die."
By yesterday evening the regime was in control of the port of Zuwaytina and the town of Adjabiya, and its forces had taken a detour south from where they would be in a position to seal the Egyptian border, the main source of supplies for the protest movement, and also approach Tobruk, the only other major city still in rebel hands.
Adjabiya's main hospital has been unable to send the seriously wounded to Benghazi. There were around 30 dead there, including some very young children. Dr Hafid Bahlagi, who had been working with little sleep for 24 hours, said: "Some of them could have been saved, if we had delivered them for correct treatment in time ..."
Khalid Abu, who had left the town during a lull in the shooting, saw a van on the side of the road with windows shattered and two bodies inside. "We don't know whether they were civilians or fighters. If you stopped you risked being attacked yourself, they are shooting at everything."
There had still been some fighting inside Ajdabiya in the morning with pockets of resistance from groups of the Shabaab, the revolutionary forces. After a while they had given up, hidden their weapons, and sought refuge with residents.
But that did not put them out of harm's way, Abu said. "There are Gaddafi supporters who are going around with the soldiers, they are pointing out houses. Nowhere is safe there at this time."
Yusuf Karim Suleyman has decided Benghazi is no longer safe. The 42-year-old lawyer and human rights activist has already experienced Colonel Gaddafi's prisons and had no wish to repeat the experience. It was his last day in Libya before returning to exile in the Netherlands.
Watching a rally outside the Central Courthouse, which has become a focal point for the opposition in recent weeks, Suleyman said: "This is probably one of the last chances they will have to enjoy freedom. Some of them may decide soon they are loyal to Gaddafi after all.
"It is not something pleasant to think about, but people do all kinds of things when they are afraid, turn on their families, their friends. We saw this in prison, and if Gaddafi wins, the whole of Libya will be a prison camp soon."