Leading article: The endgame is at hand, but holds dangers of its own

As of last night, it was unclear whether the regime of Muammar Gaddafi was in its last days if not hours. But it did seem that, for the first time in the six-month conflict, the endgame was finally at hand. Opposition forces were advancing on the capital from three sides and, while reports of clashes in Tripoli itself appeared to be premature, the central question was no longer whether the Gaddafi clan would be overthrown, but when and how – and then what would happen next.

The "when" depends on the real balance of forces and on the regime's readiness to fight. Yesterday, the Information minister, Moussa Ibrahim, spoke, as he has so often, with forked tongue. Like Gaddafi himself in an earlier broadcast, he disparaged the opposition forces and evinced a fierce determination not to cede power without a fight. At the same time, he spoke about being amenable to talks. So long as the opposition senses that it has the upper hand, however, the prospects of talks at this stage look remote.

The "how" is equally hard to gauge. There were reports over the weekend of more high-level defections from the Gaddafi camp, but also of support still holding up in Tripoli. This is not a regime that has so far shown any signs of being ready to give up power. There was a street-by-street battle for Zawiya on the western approaches to Tripoli. In the east, the oil city of Brega has changed hands several times since the start of hostilities. If the opposition has to fight for the capital, a protracted bloodbath could be the result.

This in turn could precipitate more overt Nato intervention, on the same pretext that justified the original air strikes near Benghazi: the need to protect the civilian population. Thus far, the opposition can just about claim that it has achieved its victories by itself. Nato may have advisers on the ground, and individual member countries may have special forces deployed in ways, and places, that can be technically distinguished from UN-authorised Nato operations. But it is in everyone's interest – that of the Libyan opposition and the western alliance – that the home forces should be able to win power and keep it by themselves. Anything less, and the authority of the opposition if and when it enters Tripoli will be compromised to the degree that it is seen as a client of foreign powers, rather than a legitimate ruler in its own right.

The population's perception of the opposition's strength will be a key to what happens next. And this will depend to a large extent on how far the leaders of its National Transitional Council can present a united front and a coherent vision for Libya's future. Regrettably, their performance so far has not given grounds for confidence.

Not only have there been open political differences almost from the start, but the murder last month of the military commander, Major-General Abdel Fatah Younes – allegedly for talking to representatives of Gaddafi – suggested serious, and continuing, differences in approach. With the forces converging on the capital under separate commands and with distinct regional identities, there is a real risk of further fighting over the spoils. As the endgame proceeds, those who wish Libya well should hope for the best, while preparing, in hard-headed fashion, for the worst.