With a mix of gall and desperation, Scott Morrison appeals to the electors of Wentworth to vote for stability. He warns against sending the government into minority rule, forced to ignore the fact that if this happened the Liberals would have brought it on themselves, by dumping their former prime minister.

Saturday’s byelection is crucial for Morrison, but in the campaign’s final stage the government has had its worst week since he took over.

Politically, it blundered bizarrely when its senators voted for Pauline Hanson’s “It is OK to be white” motion, because of what was described as an “administrative error”.

Read more: View from The Hill: How the government's plan to oppose Hanson's motion became a vote to support it

At a policy level and driven by the byelection, Morrison opened the explosive issue of Australia’s Middle East stance, with unpredictable consequences and some quick blowback.

To cap it all, the Nationals spectacularly undercut the Liberals’ “stability” messaging by canvassing the prospect of ousting their own leader, Michael McCormack, as Barnaby Joyce tries to reclaim his old job.

Read more: View from The Hill: Barnaby Joyce stalks Deputy Prime Minister McCormack

It’s increasingly obvious that as prime minister Morrison will do whatever he thinks it takes – and plumb some dubious depths – to serve his immediate purposes. This will be significant for the way he runs next year’s election campaign, when he’ll be fighting against the odds.

His promise, after a leak from the religious freedom report, to legislate a ban on religious schools being able to expel gay students on the grounds of their sexuality had an eye to Wentworth’s large gay community.

His U-turn on Australia’s Middle East policy was squarely driven by the seat’s make up: a Jewish component of 12.5%, compared with 0.5% in NSW and 0.4% nationally.

Read more: Morrison government courts controversy on Jerusalem ahead of Wentworth byelection

On a very different front, on Thursday Morrison suddenly declared the government would “work towards establishing an agriculture visa”, which he had previously opposed in cabinet.

They’re not too fussed about ag visas in Wentworth but his failure to secure one has been damaging for McCormack and Morrison wanted to muffle the rumbling of the Nationals’ tumbril.

Morrison’s leadership style of pragmatic agility is veneer for the quick fix rather than a solid base for effective long-term governing. Regardless, the Liberals continue to say he is a much better salesman than Malcolm Turnbull was.

In his selling, Morrison doesn’t hesitate to make some unbelievable claims. But it was still breathtaking to hear him say the new Middle East policy – to “consider” moving our embassy from Tel Aviv to Jerusalem - had nothing to do with the byelection.

This assertion insults the intelligence of a savvy electorate. For goodness sake, the announcement was made on the very day of a Jewish-run candidates’ forum! And Morrison credited Liberal candidate Dave Sharma, former ambassador to Israel, with being the policy’s advocate.

Read more: Politics Podcast: Peter Jennings on Morrison's Jerusalem move

The plan got a cheer in the party room, but there have been embarrassing leaks of a negative reaction from the Indonesian foreign minister in a WhatsApp message to Foreign Minister Marise Payne, and of an ASIO warning that the announcement might possibly provoke “some violence in Gaza and the West Bank.”

Morrison played the Jewish card overtly in responding in parliament to questions about the shift. “The Australian Jewish community can trust one party in this chamber: the Liberal and National parties,” he said on Wednesday. On Thursday he accused the NSW Labor party of “behaving in an anti-Semitic way”, referring to an incident when a Jewish leader had been turned away from a function.

The distinctive character of Wentworth underlines the multiple influences on the vote. In the main, it’s a rich and educated seat, socially progressive and elitist. It likes its members to be a big fish in the parliament; it is angry that its last MP, the biggest fish of all, was summarily tossed aside. It worries more about climate change than the current government, and cares more about refugees. But it has traditionally voted Liberal.

Single seat polls are notoriously unreliable, more so in Wentworth because mostly they’ve been commissioned by those with an interest. Liberal polling, put out presumably to frighten the tetchy back into the fold, is reported to have given independent Kerryn Phelps a 55-45% lead over Sharma.

But at the end of the campaign, no one can be confident in predicting how the result will come out. Certainly the Liberals are very worried, despite the seat’s 17.7% margin.

ABC election analyst Antony Green says Sharma needs a primary vote in the high 40s to survive being run down by preferences; Phelps has to come second to have the ability to strike. If Labor’s Tim Murray beat Phelps into number two place his chances of victory over Sharma would be much lower than Phelps’ because he would receive fewer preferences.

Turnbull this week has been telling people the Liberals won’t lose the seat. The former member, who has taken no role in the campaign beyond urging the Liberals to preselect Sharma, is on his way back to Australia, via a visit to his son Alex in Singapore. Turnbull’s arrival will coincide with the byelection’s aftermath.

In contrast to his father, Alex has been strident and active, advising Wentworth electors to vote against the Liberals. He’s denounced the party’s “crazies”, and named some (Tony Abbott, Peter Dutton, Angus Taylor, Kevin Andrews, Eric Abetz), and he has highlighted climate change as an important issue on which to send a message. On Thursday he tweeted about refugee children: “Bring them here. We don’t imprison minors, why are we doing this?”

If Phelps takes Wentworth it will be an indictment of a Liberal party that’s been out of control and a Coalition government that has been sub-optimal over two terms.

A loss wouldn’t mean the fall of the Morrison government. But it would make its operations harder, unsettle the backbench, likely add to the turmoil in the Nationals, and further strengthen Bill Shorten’s already very good prospects. It would be a devastating blow for the new prime minister.

Meanwhile a Thursday tweet by Sharma, wishing good luck to HSC students beginning exams, may offer an insight into the Liberal candidate’s own state of mind after a chaotic week in which the government made his battle harder. “Give it your best, stay calm, and remember that though this feels big now, there is also much more to life,” he advised.