Last Thursday night, with Muammar Qaddafi’s forces drawing ever closer to the Libyan rebel capital of Benghazi, the United Nations Security Council promised action to protect Libyan civilians, touching off street parties across the country’s liberated east.

Mr. Qaddafi responded by declaring a cease-fire only to break it hours later by resuming the shelling of civilian neighborhoods in the contested towns of Misratah and Ajdabiya.

Then, before dawn on Saturday, he struck the heart of the rebel campaign in Benghazi, sending rockets, tank fire, and infantry into civilian neighborhoods. Dozens of civilians and rebel fighters died in the assault.

Benghazi and the rebellion were hanging by a thread. If Libya's second-largest city fell back in the hands of Qaddafi loyalists, the resolve of Libya’s rebellion would probably fall with it.

"So, we’re being abandoned after all,” said one young rebel as terrified residents poured out of a checkpoint on the eastern outskirts of town.

But then came the roar of French jets, followed by 112 Tomahawk missiles fired by US and British forces crippling Qaddafi's defenses and air capabilities – and staving off the likely execution for dozens of rebel leaders.

Allies strike in the nick of time

Beginning Saturday afternoon and extending beyond this Sunday morning, dozens of international sorties flew over Libya and targeted the army Qaddafi sent to retake Benghazi.

Sunday, at least a dozen of his tanks, armored personnel carriers, and the countless civilian cars he used to transport troops were smoldering hulks on the the road from Benghazi to Ajdabiya, and the pendulum here had once again swung back – for what felt like the fourth time in a week – from despair to joy.

At the western outskirts of Benghazi today, as many residents who had fled returned home, a celebrating group of young men had set a dog astride a donkey.“That’s Qaddafi,” says a grinning young man, pointing at the larger animal, “and that’s his owner,” he says, pointing at the dog.

On the road toward Adjabiya, Benghazi residents came to see the wreckage, celebrate, and pose children in front of the remains of Qaddafi's tanks for the family scrapbook.

Decisive role

The international community has now taken a decisive role in Libya’s civil war, despite the statements of US Joint Chiefs of Staff Chairman Adm. Mike Mullen and other Western officials that this is only about civilian protection, not regime change.

In Benghazi today, the leaders of the rebel’s ragtag army were drawing up plans for how to move west, and civilian leaders were once again confidently predicting Qaddafi’s demise.

Mustafa Gheriani, the spokesman for the rebels transitional government in Benghazi, says their forces were sweeping up scattered bands of Qaddafi’s troops in the city throughout the day.

To be sure, there remain military challenges that international airpower will not easily be able to address. There were multiple accounts of dead Qaddafi fighters found wearing civilian clothing under their fatigues – and in some neighborhoods, residents reported finding discarded military uniforms.

That implies that some Qaddafi loyalists have secreted themselves within Benghazi and blending with the local population. It would not be hard to pick up a rifle and pose as a volunteer with the rebel militia, which still has little and command and control from officers, and pass intelligence back to Tripoli.

How did Libya and the international community get here?

On March 5, the lightly-armed young rebels of Libya’s uprising against Qaddafi were racing west in the beds of pickup trucks, grinning into the wind, saying they were confident God was on their side and victory was in their sights.

Salim Fatah bin Kayali, whose father spent seven years in Qaddafi’s prisons, spoke for all of them as they roared into the dusty town of Bin Jawwad. In the midst of 300 miles of desert that divide eastern Libya from Qaddafi’s hometown of Sirte he said “there’s no stopping us.” The fighters around him made jokes about breakfast in Tripoli.

Then the hard reality set in. The rebels were driven out of Bin Jawwad the next day, a precursor to Qaddafi’s ruthlessly efficient march east in the following ten days.

With air raids and rocket fire from an unassailable distance, the regime’s forces drove the rebels out of the desert. The rebels had no answer to an enemy that they rarely saw, and broke and ran under continuous barrages.

The towns of Ras Lanuf and Brega – built around some of Libya’s most important oil infrastructure – fell in short order. By March 14, Ajdabiya – the last population center before the rebel capital of Benghazi, the key to the uprising’s survival, was under threat.

“We have to hold on here,” said Saheer al-Saidi, a militiaman speaking at rebel command post inside the town that afternoon. “Qaddafi will be arresting and killing thousands if we lose.”

But by the next morning, March 15, Qaddafi had started shelling the town of 100,000. Rockets struck the hospital and multiple homes. The Obama administration, which had been publically wary of international action at a time when the US remains embroiled in conflicts in Iraq and Afghanistan, started to change its tune.

US Secretary of State Hillary Clinton spoke that day of international action beyond a no-fly zone, including measures “to enable the protection of Libyan citizens against their own leader.”

Meanwhile, rebel leaders continued to insist they could fight off Qaddafi’s better equipped and organized forces. Rebel military spokesman Khaled el-Sayeh insisted Adjabiya would not fall.

But the next day, Ajdabiya was surrounded and besieged, Qaddafi’s forces active in the city. Qaddafi’s son and regime spokesman Saif Islam was boasting that the rebellion would soon be crushed.

On March 17, rebel forces were pushed back to the outskirts of Benghazi. During the day, Qaddafi promised “no mercy” for the rebels inside Libya’s second largest city and felt confident enough to bring down foreign reporters from Tripoli to Ajdabiya, to show his progress in retaking the east. The reporters saw tanks, grad rocket launchers, and fuel tankers massing, all implying his pause at the Ajdabiya would not last for long.

That set the stage for the passage of UN Security Council Resolution 1973 at around midnight local time Thursday, which promised all measures to protect the city, and Libyan civilians more broadly.

On March 18, Qaddafi continued to pound holdouts in Ajdabiya with rocket fire – fleeing residents told of houses flattened and indiscriminate attacks.

The next day it was Benghazi’s turn, Qaddafi appearing to determined to eat up as much territory before international action began.

His ruined tanks and dead fighters on the city’s outskirts now indicate that final push was a failure.

What next?

It's difficult to predict what will happen next. Benghazi is secure for now, with Qaddafi having learned that his armor is completely naked to international airstrikes if he tries to move forward again. But the rebellions fighters are no better armed or organized than they were two days ago.

And Qaddafi himself is as defiant as ever. “We promise you a long war,” he said in a phone call to state television today.