With national security and Australian lives on the line, the Prime Minister hasn’t played the best of hands.
Tony Abbott is playing his last card, national security. Unfortunately for Australia, it doesn't seem he's playing it very well. The more desperate his political situation, the more badly his government is managing.
The former British Foreign Secretary, William Hague, described the world as heading into a period of "systemic disorder."
We see the dangers in three dimensions: in the rising risks posed by assertive great powers Russia and China; in the fevered bloodlust of Islamist extremists abroad; in the violent responses they excite from misguided fringe-dwellers at home.
And Abbott has told us repeatedly that "the first duty of every government is to protect the country."
Yet in all three dimensions, there are hard questions of the Abbott government's management. In what he has done in the last two weeks and what he is on the cusp of doing next week, the emerging answers are not reassuring.
The most potent armament for defending an island continent, the national submarine fleet, is decrepit. Replacing it is "one of the biggest and most consequential defence capability decisions ever faced by an Australian government," according to Peter Jennings of the Australian Strategic Policy Institute.
In its six years Labor failed the test. It dithered, cut the defence budget, and ended up doing nothing about submarines. Abbott was scathing, as he should have been. He promised to do better.
What has his government done about it? Before the election Abbott's defence spokesman, David Johnston, promised that the new subs would be built in South Australia, home of ASC, formerly known as the Australian Submarine Corporation. This was a popular position in South Australia, naturally.
But in December, Johnston, as minister, said: "I wouldn't trust them to build a canoe". What had happened in the interim? Abbott had entered a personal, political, ideological and strategic love affair with Japan's prime minister, Shinzo Abe.
Abbott wanted Australia to be the first country to buy Japanese subs. It would be a deep bond of trust. It would be a strong endorsement of the remilitarisation – or "normalisation" – of Japan under Abe. The Soryu class subs are a fine piece of hardware. The government was on the brink of announcing the decision to buy Japanese.
But it failed to figure out a way of dealing with the electoral backlash. And it forgot to account for the keen American interest in how any new Australian subs might be kitted out to operate with the US Navy.
"There was a headlong rush to be best buddies with Abe," explains a minister, "and we have been backfilling ever since."
Abbott expressed confidence in Johnston. He lauded the "absolutely outstanding job" he was doing. Nine days later he sacked him. He replaced him with another underperforming minister, Kevin Andrews.
And then, two weeks ago, Abbott himself was at risk of getting the sack. It was at this point that the utter absence of due process and "grown up government" emerged glaringly into public view.
On the weekend before the spill motion was moved to declare the Liberal leadership vacant, Abbott tried to hold the votes of two South Australian Liberals by telling them what they wanted to hear about the subs.
Senator Sean Edwards called Abbott to make sure that ASC would be able to compete for the contracts to build them. During his phone call with Abbott, Edwards wrote down Abbott's undertaking to him for a "fully competitive tender."
But when Abbott would commit publicly to only a "competitive evaluation process," Edwards felt cheated. Confusion, anger and accusations of bad faith followed. Bill Shorten accused Abbott of playing with defence to save his own job.
Abbott denied any secret deal with Japan: "We are certainly talking to the Japanese," he told the House, "but we are not just talking to the Japanese. We are also talking to the French and the Germans and the Australian Submarine Corporation."
On Thursday it emerged that the government hadn't been talking to the ASC, after all, certainly not in any serious way.
A day later the minister, Andrews, put out a statement that exposed just how pathetically little had been done on the process: "The Department of Defence will seek proposals from potential partners for: a) pre-concept designs based on meeting Australian capability criteria; b) options for design and build overseas, in Australia, and/or a hybrid approach; c) rough order of magnitude (ROM) costs and schedule for each option."
And so on. In other words, it hasn't the faintest idea. The only specific outcome it could offer was "the creation of at least 500 new high-skill jobs in Australia, the majority of which will be based in South Australia." The government has no idea who will build the subs, or where, but it knows that 500 high-skill jobs will be created in Australia.
In a tough contest, this must rate as one of the most pathetic announcements of any recent government. After a year and a half of "grown-up government", they put out the most rudimentary call for the most basic of information about a vital defence asset that will cost "in the order of $50 billion".
The second dimension is dealing with the Islamist extremists who now commit the gravest of atrocities.
One of Australia's best national assets for dealing with the problem is the close security relationship it has with Jakarta. Indonesia is the world's biggest Muslim-majority nation, population 250 million. Fortunately, it is also one of the world's most moderate, tolerant and successful Muslim-majority nations.
Yet in so large a population there are bound to be some excitable types prone to being galvanised by the propaganda of IS. And so there are. More than in any other country in Asia, according to its own government.
The chief of Indonesia's National Counterterrorism Agency said in December: "Because Indonesia has the world's largest Muslim population, the country will always be at the centre of recruitment," said Saud Usman Nasution.
In June 2014, the number of IS recruits from Indonesia was 86, he said. "The number soared to 264 in October," he added. The estimated total was 514.
An expert on the subject, Sidney Jones of the Institute for Policy Analysis of Conflict, has pointed out that "ﬁghters returning from Syria could infuse new energy into Indonesia's weak and ineffectual jihadi movement."
Close co-operation with Jakarta is essential in managing these risks. Tony Abbott, after a crisis in Australia's relations with Indonesia, managed to restore full co-operation less than a year ago. Now he is risking relations again, this time under the new president, known universally as Jokowi.
The concerted Australian campaign to save the lives of the rehabilitated drug traffickers Andrew Chan and Myuran Sukumaran has become a national cause with widespread popular support. After Jokowi turned down a request for clemency, the chances of success became very slender.
Jokowi is embroiled in a major political crisis of his own. His choice of a police commissioner under investigation by the Anti-Corruption Commission threatened to destroy the commission, one of Indonesia's most important and successful institutions. The death penalty case against the Australians was politically useful for Jokowi: "The scandal is tracking very badly for him and he thinks the death penalty is tracking well for him" explains Greg Fealy, a highly regarded Indonesia expert at ANU.
Yet some hope remains for the men on death row. Abbott's government has been doing a sound job of campaigning for them, and Abbott had wisely drawn a line, saying he would not do anything to compromise the overall relationship. Until Wednesday.
"Let's not forget that a few years ago when Indonesia was struck by the Indian ocean tsunami, Australia sent a billion dollars worth of assistance," he said.
He expressed hope that Indonesia "reciprocate in this way at this time." Indonesia's foreign affairs spokesman Arrmanatha Nasir rejoined: "Threats are not part of diplomatic language. And from what I know, no one responds well to threats."
If Jokowi was looking for an excuse to dismiss the Australian campaign to save the condemned men, Abbott had just given him one. Says Fealy: "I think it's a major mistake on Abbott's part. It allows Australia's detractors to say, 'their aid isn't about disaster relief or humanitarian aid, it's about Australia's objectives. It's interfering in our legal system'. It risks having the opposite effect of the one he intended."
The third dimension is Australia's management of homegrown terrorism. Abbott promised that he would "crack down" on Hizb ut-Tahrir in his Monday speech on national security. This is an international group with an Australian arm based in Sydney. It advocates an end to democracy and the imposition of sharia. It has been closely monitored and not found to have broken any laws in Australia. It does not advocate violence. It opposes the IS claim of a "caliphate." Officials say that Abbott is weighing ways to ban it.
It is a very distasteful outfit. But should he try to ban it? The former ASIO chief, David Irvine, said in his valedictory speech that the half-million Muslim community in Australia was the best asset in managing anyone who might be tempted to extremism. The community's leaders should be "thanked, not blamed" for their contribution to national security, he said.
One of those leaders says that an attempt to ban Hizb ut-Tahrir "would feed into the narrative of those that are disenfranchised – that Muslims are being victimised and persecuted," says Samier Dandan, president of the Lebanese Muslim Association. "We would be fuelling the fire to say that freedom of speech applies to one group but not another. I am not afraid of them because I have the intellectual narrative to overcome it.
"Do you shut them down or do you negate their narrative? You need a voice of reason to overtake their voice of ignorance."
And on a very practical level, a security official observes, a ban might not only strengthen the group by vindicating its message, it would also drive them underground. It's much harder to monitor an underground group than one operating in the open.
If Abbott's government goes ahead with an attempt to ban the group, it will be more about political posturing than a true security measure. Abbott will not always be prime minister. But the security threats will endure. He has made enough unforced errors and bungled security matters too many times. No more.
Peter Hartcher Sydney Morning Herald political and international editor