Australian Prime Minister Scott Morrison's recent announcement that he is considering recognising Jerusalem as Israel's capital took many by surprise, and none more so than Indonesia, perhaps Canberra's most crucial regional ally. Enter some unusual diplomacy to mend ties, writes Kathy Marks in Sydney.
He was dumped as prime minister, relinquished his seat and insists he is now just a private citizen. Yet last week Malcolm Turnbull was in Bali, meeting senior Indonesian leaders in an attempt to calm diplomatic tensions created by the man who ousted him, Scott Morrison.
Indonesians could be forgiven for feeling confused.
Certainly, they are perplexed and angry, following Mr Morrison's announcement last month that Australia is considering moving its embassy to Jerusalem and recognising the contested city as Israel's capital.
The news was bound to be received poorly in neighbouring Indonesia, the world's most populous Muslim country. Yet the government gave barely 12 hours' notice of the policy shift - seen as an attempt to woo Jewish voters before a by-election - to President Joko Widodo and his senior ministers.
By unhappy coincidence, Mr Widodo and his Foreign Minister Retno Marsudi were hosting the Palestinian Foreign Minister Riyad al-Maliki that same day.
"It was rotten timing," says Ross Taylor, president of the Indonesia Institute, a Perth-based think-tank.
'Slap' to Indonesia
In leaked WhatsApp messages the previous evening to her Australian counterpart, Marise Payne, Ms Marsudi called the embassy issue a "really big blow" that would "slap Indonesia's face on the Palestine issue".
Now diplomats in both countries are scrambling to minimise the damage to a key bilateral relationship which encompasses regional security, defence, policing and anti-terrorism co-operation, as well as joint measures to thwart "people smugglers".
Also at stake is a free trade agreement, painstakingly negotiated over a decade and due to be signed soon, giving Australia access to a market of 268 million people, including a huge emerging middle class.
Hence Mr Morrison's unorthodox deployment of Mr Turnbull - in Bali for a conference on ocean sustainability - to explain Australia's position to Mr Widodo and Ms Marsudi.
While in office, Mr Turnbull built a warm rapport with the president and the bilateral relationship blossomed, following strains caused by revelations that Australia spied on Indonesian leaders and Indonesia's execution of two Australian drug smugglers.
Foreign policy experts say what happens next will depend on whether Mr Morrison, following US President Donald Trump's lead, goes ahead with the Israel embassy move - which would be "met with a very negative reaction in Indonesia", Mr Turnbull warned after his meetings.
Mr Widodo is facing a presidential election next April, and would be under pressure to prevent his opponent, Prabowo Subianto, from painting him as soft on Australia.
"Any hint that Jokowi is undermining Indonesia's sovereignty and hurting the feelings of the Islamic electorate, the opposition can spin it into a big deal," says Evan Laksmana, from the Centre for Strategic and International Studies in Jakarta.
It is a sensitive time politically in Australia, too, with a general election due by next May. The by-election, which Mr Morrison's Liberal Party lost, was crucial because the government had a one-seat majority in the House of Representatives.
While Indonesian leaders understand the demands of domestic politics, the Israeli-Palestinian question is "particularly sensitive and emotive" in Indonesia, Mr Laksmana says.
He adds: "So you're potentially dropping a domestic political timebomb [with the embassy announcement], but you couldn't give us a heads-up that this was even being discussed?"
Australia has 'more needs'
It has emerged that Mr Morrison did not consult Australia's Department of Foreign Affairs before announcing the policy review. Even Foreign Minister Payne learnt of it only two days beforehand.
In a reference to Ms Marsudi's WhatsApp messages, Mr Taylor says: "For someone from Indonesia to be angry like that is quite unusual and not in their culture. The leadership were really, really annoyed that something like this would come out of left field. Australia really set Jokowi up."
Although Mr Widodo is keen to sign the free trade agreement and boost his economic credentials at a time when the Indonesian rupiah is plummeting, Mr Taylor believes the agreement would be an early casualty of any deepening diplomatic rift, "and the pain of abandoning it would be felt much more strongly in Australia".
"Let's be honest: Australia needs Indonesia much more than Indonesia needs Australia," he says. "50% of our trade goes through Indonesian waters, and Indonesia acts as our first line of defence in issues such as anti-terrorism and people smuggling. This is the kind of co-operation which could be seriously harmed.
"Turnbull wasn't exaggerating when he said that Indonesia - and Malaysia, in fact, and the whole region - would take that [relocating the embassy] really seriously."
Some doubt it will happen. Marcus Mietzner, an Indonesia expert at the Australian National University, says: "Indonesia's tough response serves Morrison's interests.
"He can cite it when he… announces that the review concluded not to pursue it [the move]. This will send a message about the importance of the relationship and help Morrison to save face."