The British government's handling of the Libya situation over the weekend has transformed the political impact of the crisis.
On Thursday David Cameron was forced to say he was "incredibly sorry" for the delay in helping British nationals stuck in Libya to get home. Foreign secretary William Hague announced a review of the Foreign Office's airport evacuation procedures.
The opposition, initially tentative, couldn't help itself. Shadow foreign secretary Douglas Alexander became increasingly critical, until Labour figures were openly accusing the government of incompetence by Friday night.
If the prime minister had been forced before parliament on his return from the Middle East MPs would have made mincemeat of him. After four days of frenetic activity, the case is altered. Cameron can be much more confident as he steps up to the despatch box this afternoon.
Over the weekend around 800 British citizens have been extricated from the violent upheavals of revolutionary Libya. The armed forces have done their jobs smoothly. Most impressively, the oil workers trapped in their remote desert camps have been extricated. The apologies of last week feel like they are firmly in the past.
One of the RAF's Hercules C-130 transport aircraft is believed to have come under small-arms fire as it landed in the Libyan desert. The damage appeared little more than superficial. But it could have been otherwise. Cameron took a risk when he sent in the RAF for their rescue mission. Was he thinking about the political upside when he did so?
It's always uncomfortable thinking about the political benefits which accrue from military actions. We like to think that our politicians will place these considerations at the back of their minds when they make decisions about people's lives. But politics is what politicians do, even when their decisions are inextricably linked with consequences extending far beyond Westminster.
"It is risky and it is difficult but I judged it was the right thing to do," a relieved prime minister said last night.
"Obviously Libya is a country in complete chaos and so it is difficult to arrange these things, but it was the right thing to do."
You can almost hear the relief in his voice. With hindsight, it was the right thing to do. He cannot have known that for sure beforehand.
It's difficult to divide this narrative without thinking about the prime minister's arrival back in Britain. He returned home on Thursday after saying he was "incredibly sorry" for the delay in helping Brits leave Libya. After chairing the national security council and the emergency Cobra committee on Friday morning, the government swung into action. Rescue missions into the Libyan desert came just as the Foreign Office-led chartered flights into Tripoli finally came good.
Cameron introduced a sweeping strategy of extracting the last British nationals from Libya who wanted to get out, while simultaneously making the first decisive moves against the Gaddafi regime, in concert with other countries at the UN. This looks coordinated and clever. The government deserves credit for it as a result.
It was only able to do so because of the military's actions, however. The net impact of the Libya situation could end up being positive for the government, not negative. It's quite a turnaround, preventing Ed Miliband and co from making the most of the failings so painfully evident last week.