New South Wales is always difficult for the Coalition. They have only had one convincing election win there in more than thirty years. Nonetheless, a gain of only one seat against a very tired-looking three-term government is a woeful result.

It is particularly bad for the Liberals, whose leader, Peter Debnam, was universally regarded as being not up to the job. Labor’s campaign against him was no more “negative” than the Coalition’s campaign against Labor ministers (although not the premier), but it was much more effective.

The Liberal spin on Saturday night was that although they had failed to win seats, they had achieved big swings in enough marginals to set up victory next time.

That is at best a half-truth. There were some substantial swings – Miranda, Menai, Port Stephens and Camden all shifted more than 5%. But many others either failed to swing significantly or actually moved towards Labor. As in Victoria last year, the Liberals did much better in their own marginal seats than in the government’s.

The Coalition’s target has not moved a great deal closer. Prior to the election, the uniform swing required to win ten seats – a reasonable minimum to give the Coalition a chance of forming government – was 8.9%. Having won one, the swing now required for another nine is about 6.7%. Wyong is the new median seat; it, Miranda and The Entrance are new to the target list, while Drummoyne, Penrith and Kiama have moved relatively out of range.

(These calculations are all based on the ABC’s figures; they will change slightly with further counting, but not enough to disturb the general picture.)

Malcolm Mackerras in this morning’s Australian says that the Coalition now only needs a swing of 4.2% “to defeat Labor”, but by that he just means depriving Labor of its absolute majority (I make that figure 4.5%). Calling that a possible Coalition victory requires the heroic assumption that independents in Labor territory – Sydney, Newcastle, Lake Macquarie – would vote to make Peter Debnam premier.

Indeed, the assumption that Debnam will still be leader in four years’ time is even more heroic; I doubt that he will last the week.

The last election to focus so strongly on an opposition leader was a little over two years ago in Western Australia. Colin Barnett, who made up very little ground against a government that was seen to be in trouble, announced his resignation immediately afterwards. Peter Debnam should have done the same at the weekend.

Sands can shift quickly in the NSW Liberal Party, but at present the word is that deputy leader Barry O’Farrell will have the numbers for a successful leadership challenge. There is really no alternative: Debnam is irreparably damaged, and if the last three elections have taught the party anything it should be the need for a leader to get a full term in the job, not just a few months.