Australian Prime Minister Scott Morrison yesterday announced that Australia will recognise West Jerusalem as the capital of Israel, in a controversial move that could derail a proposed A$16.5 billion (S$16.3 billion) free trade deal with Indonesia.
The Federal Cabinet agreed to the move on Tuesday, but it was not announced until a speech by Mr Morrison in Sydney yesterday.
Meanwhile, Australian officials were busy briefing Indonesia and other allies in a bid to explain the decision and minimise any fallout.
Mr Morrison initially indicated he was considering following US President Donald Trump's lead and relocating the embassy from Tel Aviv to Jerusalem, a move that outraged the Palestinians and Arab nations.
Instead, Mr Morrison announced that the embassy will not be moved until the long-running Israeli-Palestinian conflict is resolved, but Australia will open a trade and defence office in West Jerusalem.
The decision will likely have little impact on the Middle East peace process, but it could have damaging consequences closer to home.
Canberra has been particularly concerned about the response in Jakarta, where the anger over Mr Morrison's foray into Middle Eastern politics has threatened to scupper the long-awaited trade deal.
Mr Morrison met Indonesian President Joko Widodo in August and agreed on the final details of the deal, which has been negotiated since 2010. The leaders were reportedly due to sign it at the Asean summit in Singapore last month.
But then came Mr Morrison's surprise announcement in October that he was considering moving the Tel Aviv embassy. This was widely seen as a ploy to win the sizeable Jewish vote at a crucial by-election in the Sydney seat of Wentworth. The move backfired and his Liberal party failed to win the election.
In the end, Mr Morrison yesterday attempted a compromise, saying he would not relocate the embassy until it was "practical" and that Australia regarded East Jerusalem as the future capital of a Palestinian state.
The announcement appeared to be a bid to avoid political humiliation. He did not go as far as moving the embassy, which could have produced a heavy international backlash, but he adjusted Australia's Middle East policy, which allowed him to claim he had been "consistent".
Still, Mr Morrison has been criticised for the announcement, particularly as it threatens to damage relations and trade ties with Indonesia and other Muslim-majority nations such as Malaysia and Saudi Arabia.
The leader of the opposition Labor party, Mr Bill Shorten, said yesterday the embassy announcement had damaged Australia's international reputation. "I'm tempted to think it was a sort of rookie mistake... but it is a little more serious than that," he said. "My fear is that Mr Morrison hasn't just had to do a political backdown - my fear is that he has made Australia look stupid on the international stage."
The problem for Mr Morrison is that Mr Joko faces an election next year and has his own domestic political considerations.
Mr Ross Taylor, president of the Indonesia Institute, which promotes Australia-Indonesia relations, said Mr Morrison had left Mr Joko in a difficult position and that ultra-conservatives in Indonesia will argue that recognising Israeli sovereignty over "any part of Jerusalem is totally unacceptable".
Mr Taylor said Canberra and Jakarta are unlikely to sign a trade deal soon, and that the prospects of it then being ratified by the Indonesian Parliament are "very slim".
"A number of senior Indonesian ministers and officials want the IA-CEPA (trade deal, known as the Indonesia-Australia Comprehensive Economic Partnership Agreement) signed and the bilateral relationship maintained on a good footing," Mr Taylor wrote yesterday on the institute's website. "But how to do this without alienating the powerful conservative Islamic groups?"
Former deputy prime minister Barnaby Joyce warned in October that Australia needed to be "careful" about upsetting ties with Muslim-majority and Arab states. He said Australia could risk its exports of agricultural products, not just to Indonesia but also to countries such as Qatar, Bahrain and Jordan.
Mr Morrison will be hoping that his decision to keep the embassy in Tel Aviv will soften any backlash.
Describing Australia's new position yesterday, he said: "It's a balanced view, it's a measured view, it's a well-considered view."
He will soon discover whether Indonesia and others agree.