After years in opposition alleging Labor did “grubby” political deals to win support in the parliament, Tony Abbott is going to have to find new negotiating skills to get his own legislative agenda through an unwieldy and unpredictable senate after July.

Under one possible outcome in the WA Senate rerun (Labor winning the final seat) if Labor and the Greens oppose a bill, Abbott is going to need the Senate votes of the Palmer United party bloc and also three votes from a diverse group of four – Independent Nick Xenophon, the DLP’s John Madigan, Family First’s Bob Day and the Liberal Democratic party’s David Leyonhjelm. Labor and the Greens would need only two of the crossbench to join with them to win the 38 votes needed to block a bill.

Under the other scenario (the Liberals winning the final seat) Abbott would need Palmer and two more votes, and Labor and the Greens would need to find three to block.

Of course Labor and the Greens will not always oppose the Coalition. The Greens, for example, are the Coalition’s best best bet to win passage for Tony Abbott’s generous paid parental leave bill, with some amendments. And it is not uncommon for the major parties to vote together.

And on some things – for example the repeal of the carbon and mining taxes – the crossbench votes won’t be hard to find.

But the first scenario could see other bills blocked, for example the abolition of the clean energy finance corporation.

And under either scenario Clive Palmer has enormous power to wield in his unpredictable way. (During the course of the WA campaign he appeared to impose a new condition on his Senate votes regarding the mining tax repeal – benefits to war orphans – and remove a longstanding one from his votes on the carbon tax repeal – that it should be made retrospective.) He also flatly contradicted a press statement on the renewable energy target issued by his lead candidate.

The major parties each said they wanted WA to be a referendum on the first seven months of the Abbott government and they each got a pasting.

After Labor’s candidate was revealed to hold members of his own party in disdain there will be much talk in the ALP of changes to pre-selections. And calls for changes in the Senate voting system will continue.

But the immediate impact of Western Australia’s vote is to clarify the complexity of the deal-making the prime minister has before him.