Indonesia's reaction to spying allegations started off looking somewhat pro-forma but by the end of the week had turned into something quite different — the possibility of a major diplomatic incident on the high seas.
Foreign minister Marty Natalegawa's first response in Perth last Friday was to say the revelations of electronic spying from Australia's embassy in Jakarta were "not cricket" and were a breach of "trust". He strengthened his remarks over the following days but it was still unclear just how serious Jakarta was.
Then, in a masterpiece of bad timing for Australia, with Foreign Minister Julie Bishop and Defence Minister David Johnston both in Indonesia, the first asylum seeker boat for almost a fortnight made its run for Australia.
When the engine broke down (or perhaps was sabotaged) mid-ocean, and Customs vessel the Ocean Protector came to its assistance, Australia tried to follow what the Abbott government would like to be the protocol in all such situations — returning the people to Indonesia.
It gave Indonesian authorities a chance to make a strong statement. Carriage of negotiations was removed from the search and rescue agency Basarnas to the foreign affairs and security departments. No permission was given for the people to come to Indonesia.
It was the first concrete sign that a backlash by Jakarta over the spying affair could have serious ramifications for co-operation in the key area of people-smuggling. Up until Friday, it seemed that Tony Abbott and Bishop's fence mending with Jakarta over asylum-seeker policy - praised by most Indonesia-watchers - had been successful.
It all comes at a delicate time in Canberra's relations with Indonesia, which Abbott calls "the most important country to Australia".
There remains the possibility that Jakarta is performing a bit of political theatre aimed at a domestic audience ahead of elections there next year. Yet the steadily growing strength of Jakarta's reaction has surprised many observers and has brought into sharp focus the challenges that lie ahead for Abbott and Bishop.
Some observers see genuine irritation in Jakarta's reaction to the spying affair reflecting real differences in how the two sides see the relationship. One view suggests that the Indonesian government is angry that Australia isn't matching words with deeds when it proclaims Indonesia a vital 21st-century partner while at the same time spying on it through an Anglosphere intelligence-sharing club - the so-called "five eyes" agreement - dating to the 1940s.
Richard Woolcott, one of Australia's most respected former diplomats who has long called for closer ties to Indonesia, points out that Natalegawa's attacks have tended to link Australia's involvement in the surveillance program to the US - a clue that this, rather than the spying per se, is the source of the irritation.
Woolcott doubts Indonesia is about to ditch counter-terrorism and people-smuggling co-operation; that work is in both countries' interests. But it is waiting for substantial proof that Australia appreciates the change that is happening in global power and is prepared to rebalance its relationships between the US and Asia.
"In the longer term, we need to put flesh on the bones of our statements - Mr Abbott's statements - that our relationship with Indonesia in the future will be an important one. That will involve, over time, seeking a more appropriate balance in our relationships," Woolcott says.
"They will be looking for some indication that that is taking place."
That would mean nothing less than a structural rebalance of Australia's relationships with its traditional allies and its newer friends in Asia. Certainly there is no indication that Abbott and Bishop intend to meet Jakarta's demands for a full explanation of the spying, let alone a promise to stop gathering signals intelligence in future.
It may not come to that. Australian National University national security specialist Professor Michael Wesley is in the optimistic camp that says Indonesia is playing diplomatic games over the spying affair but ultimately recognises the need for a pragmatic and productive relationship with Australia - an attitude that has prevailed since the Asian financial crisis of the late 1990s.
"It's only in relationships that matter that people do play games like this. If the relationship didn't matter ... they wouldn't do it," he says.
But he adds that the episode also shows "the vulnerability of the bilateral relationship to unforeseen turbulence" - like Schapelle Corby, the Bali nine and activism in its Papuan provinces.
That vulnerability stems partly from the relative unsophistication of the two societies' - as opposed to the governments' - understanding of one another. "The fact that there is such a gulf of understanding between Australian and Indonesian society means that things ... can trigger long-held prejudices that rise to the surface and I think that's what's happening at the moment. [They think] Australia is rich, it lords it over Asian countries ... Australia wants to do Indonesia harm and to break it up. All of these things are triggered by this."
Just as the Corby case sparked Australian prejudice, spying by a close, English-speaking neighbour stokes Indonesian prejudice. This has been seen in the wave of hacking attacks by young Indonesians against - perfectly innocent - Australian organisations' websites.
As one hacker told Fairfax Media this week: "We conduct on the basis of our sense of nationalism. We just do solidarity to defend against the actions of the Australian nation."
A "nightmare scenario", Wesley says, could arise if the Indonesian military overreacts to Papuan rights activists and carries out some atrocity. Australia would find it "very hard to contain the fallout".
In any event, backing down to Jakarta on electronic surveillance would effectively mean ditching the "five eyes" agreement with the US, Britain, Canada and New Zealand - a long shot indeed. The agreement is a bedrock of Australia's security, says Des Ball, Australia's foremost expert on signals intelligence, based at the Australian National University.
Under the agreement's division of labour, southern Asia from the Andaman Sea off India to the Western Pacific is Australia's patch. In return it gets intelligence from across the globe netted by its four partners. The Defence Signals Directorate (the agency for Australia's electronic spies) is the best funded of the intelligence agencies by a wide margin, Ball says. DSD's Shoalwater Bay facility in Queensland is largely dedicated to Indonesia alone.
"Signals intelligence is by far the most productive form of intelligence." And, Ball adds, we're not about to give it up.
That means Abbott and Bishop are going to have to find another way out of this. Will it blow over? Many, including Ball, think so. But if Woolcott is right and Indonesia is really looking for evidence that Australia is reprioritising towards Asia, every future incident could become a test of that expectation.
It is believed former US National Security Agency contractor-turned-whistleblower Edward Snowden made away with tens of thousands of classified documents, only a fraction of which have yet been made public. The polite smile Bishop has been showing this week in her dealings with Indonesia could become a rictus.
The Lowy Institute's Dave McRae says while we shouldn't be complacent about these bumps and knocks, both sides ultimately understand that the relationship is important enough that we've become pretty good at getting past these problems.
"It's been a relationship where you've had not-infrequent controversies, but there are strong underlying incentives for co-operation; so even when you've had short-term upheavals, the relation-ship has tended to gravitate back towards co-operation," he says. But part of that is understanding the evolving nature of the relationship. "It's very important that Australia gets that right," Woolcott says.
In the longer term, according to Greg Fealy, an Indonesia expert at the Australian National University, that means Australian leaders must get used to the blunt fact of Indonesia's growing power, as the nation of 250 million consolidates its democracy and grows its economy.
If cliches exist among the Indonesian public of Australia as an Anglosphere rump clinging onto 20th-century ideas of power, some not-dissimilar realities exist at the level of the political elite, Fealy says.
"There is growing Indonesian irritation with Australia coming [to meetings] with Australia-centric requests and demands.
"Our sense of urgency about [boats] is far in excess of any sense of urgency the Indonesians have about it. Indonesians feel that a lot of these agendas are about addressing Australian problems."
Fealy and others say that Abbott and Bishop had gone a long way towards addressing those irritations in their close attention to Indonesia in their first two months of government. But that approach needs to be sustained, they say.
The best-case scenario in next year's presidential election would be a victory for the Jakarta mayor Joko Widodo, seen as the most Australia-friendly of the frontrunners.
Polls point to a possible Widodo victory. Even still, he is unlikely to be as easy-going as Susilo Bambang Yudhoyono.
"Australia used to think Australia was more important to Indonesia than the reverse," Fealy says. "I think you could argue against that historically, particularly over the last 20 or so years. But increasingly in the future, [there] will be a really obvious answer to [that proposition], and it's not going to be in Australia's favour."