The cost of Australia's spying operations in Indonesia is rapidly climbing as Jakarta begins to wind down co-operation in crucial areas after Prime Minister Tony Abbott's refusal to apologise or explain.
Retaliation appears likely to affect a wide range of programmes, from people smuggling and terrorism to live cattle exports ahead of today's expiry of Indonesia's deadline for what it regards as an adequate response.
"Downgrading the level of the relationship between Indonesia and Australia has been done," Foreign Minister Marty Natalegawa said. "We have already adjusted various forms of co-operation. We are turning off the tap by degrees. It is being measured according to Australia's response."
A series of leaks from American whistleblower Edward Snowden have steadily increased outrage in Indonesia, including revelations that, with the United States, Australia used a climate change summit in Bali to spy on Indonesia and that it had intercepted high-level communications from a secret electronic listening facility at its Jakarta Embassy.
The latest disclosure, that the Australian Signals Directorate tried to tap President Susilo Bambang Yudhoyono's phone and monitored calls by his wife and eight senior ministers, triggered Jakarta's increasingly tough response.
But the disclosures have also shown the scape and sophistication of Australia's electronic listening capabilities, enhanced by new technologies that allow its secret eavesdroppers to scoop up vast amounts of data for later processing and analysis.
The news that Australian diplomatic posts were being used to gather intelligence was hardly surprising. It has long been tacitly accepted that embassies spy on their hosts: former Indonesian intelligence chief General Abdullah Mahmud Hendropriyono told Channel Nine his agency had tapped Australian civil and military communications and politicians' phone calls. Hendropriyono also assumed Australia was doing the same in his country: "She is silly if she doesn't do that, you know."
Australia has huge incentives to eavesdrop on Indonesia. It is a member, with the US, Britain, Canada and New Zealand, of the "Five Eyes" intelligence alliance with responsibility for snooping on its closest neighbour. Its listening posts in Australia, for example, monitor Indonesia's Palapa satellites that carry mobile and radio communications. According to the Snowden documents, its embassy intercepts sensitive political, military and other communications.
Indonesia is a doorstep to Asia and its relations with other close Asian neighbours are of keen interest to Australia. It is also an emerging power, with 250 million people, an economy that will become the world's seventh-largest by 2030, with an affluent middle class of 135 million. A knowledge and understanding of Indonesian thinking and the views of its politicians is central to Canberra's efforts to forge a stronger relationship and to provide the aces in bilateral negotiations. Indonesia is one of Australia's largest trading partners and its third-biggest farm market.
At present, Australia is negotiating a comprehensive economic partnership agreement, as well as thorny market access issues ranging from tariff and quarantine barriers to import regulations. Eavesdropping can provide an important advantage on negotiating positions and intentions.
Security is also a key target, beyond present agreements on defence cooperation, terrorism, people smuggling and transnational crime. Indonesia controls important sea lanes and has plans to eclipse Australia's military strength over the next 15 years, with plans to greatly expand its surface navy, build a fleet of diesel-electric submarines and equip 10 air force squadrons with strike jets.
But Australia has now taken a hit. The personal targeting of Yudhoyono and his wife and colleagues - which some analysts believe was more a technological "because we can" move than a deliberate policy - severely embarrassed one of Australia's best friends in Asia. Yudhoyono has been criticised for his warmth toward Canberra, and could be replaced by a far less friendly president when he retires next year. His Democratic Party is struggling, and Australia could be a football in the elections as Indonesia was in the campaign for last September's election.
More urgently, Australia's diplomatic relationship is rapidly unwinding, with Indonesia warning that almost every agreement between the two countries was now at risk. Indonesia's Religious Affairs Minister, Suryadharma Ali, has cancelled a trip to Melbourne, and police chief General Sutarman told the Jakarta Post he was preparing to halt all joint programmes, including people smuggling and terrorism. The Law and Human Rights Ministry is also preparing to pull out of people-smuggling programmes. On Tuesday night, Yudhoyono met key ministers to discuss the response and yesterday held talks with Ambassador Suryadharma Ali, recalled from Canberra after the latest revelations.