With the Libyan civil war now dragging on into its fifth month, and the western involvement into its fourth, the airwaves have been thick with entreaties that Nato should stay the course, as if the only impediment to pursuing a successful intervention these days is faint hearts and empty coffers back home. There are others. One is that the rebel army is stuck in the woods, 15 miles outside Misrata and 130 miles east of Tripoli. Another is that, despite a stream of high-level defections, rising bread prices, a naval blockade and long queues at the petrol stations, Muammar Gaddafi has held firm. Describe his ruling clique as you will – a family clan, the men of the tent, war criminals – but the fact is they are still there, and what's more, they appear to enjoy a measure of support. Assessing how much is an inherently flawed activity in a rump state under siege, whose prisons are filled with torture victims, but it is an inconvenient truth that Tripoli has just seen one of the biggest demonstrations of the campaign.

The most significant impediment to an end of the war is none of the above. At the heart of Nato's campaign lies a wish: if only the rebels were better armed, better trained and disciplined, if only one of those bombs were smart enough to find Gaddafi himself, the gates to Tripoli would fall open. In this fantasy, the omnipresent face of the dictator is replaced overnight by monarchy-era flags, and the Transitional National Council (TNC) marches straight in. Victory day. All you need to sell are the film rights, but this is a long way from becoming a reality. Still less does it amount to a policy.

The intervention saved Benghazi but as we predicted four months ago, it has produced partition and military stalemate. An intervention launched in the name of saving civilians has morphed into a drive for regime change. It is as if a coalition ground force is rumbling towards Tripoli. But nothing is rumbling anywhere. The Libyan rebels demand not just that Gaddafi go, but that the order he established be replaced. As this involves the fate not just of his own tribe, the Qadhadhfa, but those of two major tribes from which his armed forces are drawn, the Magarha and the Werfella, it is hardly surprising that western Libya is still fighting this one out.

This is not to say tribal loyalties are set in stone. But it means that even if the regime was decapitated in an airstrike, it would still continue. It does not mean that the Benghazi rebels would be welcomed with open arms into Tripoli. As the International Crisis Group cogently argued, Nato's absorption of the rebels' demands that has made Gaddafi going a precondition for a ceasefire and negotiations has been one of the central miscalculations of the whole saga. Yesterday the TNC welcomed an African Union offer to open talks with the government in Tripoli without the involvement of Gaddafi, but maintained that his departure was essential for a ceasefire. This, as the ICG argued, confuses two aims: securing a ceasefire and ensuring that neither Gaddafi nor any of his family are involved in the post-Jamahiriya settlement. To secure the latter, you will need the former. To secure a ceasefire in the absence of any military breakthrough, it will be on the understanding that Gaddafi will not leave Libya. Indeed, the most likely partners of such a negotiation would be two men who until recently were in the same reformist faction: Mustafa Abdul Jalil, the former justice minister and now chairman of the TNC, and Saif al-Islam, Gaddafi's eldest son, for whom the International Criminal Court last week issued an arrest warrant.

Reversing out of a course of action that demands nothing less than the immediate capitulation of Gaddafi and sons, and the tribes from which they derive their power, is going to be painful for Nato. If Tripoli does not fall, it will have to be done.