If the New South Wales Greens were devout Christians, they would fall on their knees thanking the brains trust that runs the NSW Labor Party.

Labor’s factional rulers managed to hand the Greens their most successful result in the party’s 30-year history — a likely four seats in the NSW lower house.

Take Newtown and Balmain, two Greens seats in inner Sydney. By common agreement, the successful Greens candidates Jenny Leong and Jamie Parker were elected on the basis of their opposition to the Baird government’s unshakeable commitment to the $15 billion WestConnex motorway, part of Prime Minister Tony Abbott’s unthinking infrastructure nightmare.

The project, loathed by many residents in south-Sydney suburbs such as Newtown, Enmore, St Peters and Tempe, has led to a flurry of street protests and petitions.

The problem for Labor was that, in his former incarnation as Labor’s federal transport minister, Anthony Albanese had promised $1.8 billion to WestConnex.

When the New (repeat New) M5’s route was published late last year, Albanese made a frantic public backtrack, writing to the project’s delivery authority: “From what has been published, the proposal to widen the M5 and dump traffic at St Peter Interchange is absurd.”

But the damage had been done. The Greens candidates focused their fire on WestConnex and Albanese’s earlier support for it. Voters were sceptical of Labor’s formal opposition to the project, and backed the Greens.

Leong won an astonishing 47% of the primary vote in the new seat of Newtown, wiping the floor with Penny Sharpe, Labor’s opposition transport spokeswoman and an upper house MP.

In Balmain, sitting Greens MP Jamie Parker defeated former education minister Verity Firth for the second time. He increased his majority from 205 votes in 2011 to around 2000.

In the Northern Rivers region on the Far North Coast Labor strategists also managed to shoot themselves in both feet and give votes to the Greens.

Greens candidate Tamara Smith has won Ballina. In the neighbouring seat of Lismore, another Green, Adam Guise, is in a photo finish with sitting Nationals MP Thomas George. When the polls are declared, Geoff Provest in Tweed may be the only National left standing in the region, giving hope to the Greens capturing the federal seat of Richmond from Labor’s Justine Elliot.

When Labor’s managers decided to exchange preferences with the Greens in the three Nationals-held seats, they made the arrogant miscalculation that Labor would outpoll the Greens.

Unfortunately for Labor, the reverse happened; the Greens outpolled Labor. That meant Labor’s preferences flowed to the Greens and the Greens swept ahead of the Nationals, powered by Labor’s support, in Ballina and Lismore.

Why didn’t voters in the Northern Rivers trust Labor on coal-seam gas (CSG) extraction? Simple. Under the previous Labor government (1995-2011), licences covering half the land mass of NSW were handed to get-rich-quick mining merchants while the party’s coffers allegedly swelled with generous campaign donations.

There was also the fact that, in February 2013, Tony Burke, Labor’s former federal environment minister, approved the Whitehaven mine near Narrabri and green-lighted AGL’s coal-seam gas development at Gloucester, one of the flashpoints of the anti-CSG protest.

Labor’s backflip on CSG in the NSW election campaign didn’t convince voters; they ignored the party’s sudden conversion and ticked the Greens.

Hall Greenland, convener of the NSW Greens, told Crikey: “The Labor Party jumped on the bandwagon during the election campaign with a promise to ban gasfields in the North and, while it added to their vote, more people stuck with the Greens.”

Opposition Leader Luke Foley campaigned vigorously in Newtown and Balmain for his two “hard Left” faction allies, Penny Sharpe and Verity Firth, and both lost. He spent an unusual amount of time in Ballina and Lismore backing Labor candidates who looked likely to lose.

The moral of the story? NSW Labor is suffering a grievous loss of public trust, it is failing to present policy that is relevant to its natural constituency, and it is chronically disconnected from a majority of voters.

Can Foley change things? The signs aren’t good. He is rusted onto his cronies at the party’s head office in Sussex Street, where he previously worked, and they are rusted onto him. He needs to get rid of those barnacles.