The US National Security Agency (NSA) spying scandal was sparked by the release of documents by former NSA employee Edward Snowden.
The leaks caused outrage around the world, including in Australia where documents released by Snowden revealed Australia had been spying on its regional neighbours as part of a joint intelligence program with the US.
So why has the release had such a dramatic impact on global relations, and what are the implications for Australia?
What are the key global developments in the scandal?
Snowden, a computer analyst who worked as a contractor for the NSA, leaked details about the extent of top-secret surveillance programs undertaken by the US and its allies, including Australia and the United Kingdom.
Coming in the aftermath of the WikiLeaks scandal, an irate US government launched a global manhunt to track the source of the leaks.
Snowden, however, had been much more discreet with his communications, and was able to make it to Russia where he applied for asylum.
His leaks initially exposed the extent to which the US was gathering information on its own citizens, and prompted widespread calls for a rethink about the scope of intelligence monitoring.
The scandal took on a international element after allegations emerged that the NSA monitored the phone calls of 35 world leaders, including tapping the mobile phone of German chancellor Angela Merkel, and conducted widespread electronic snooping on a global scale.
The revelations resulted in a stinging rebuke from Ms Merkel, a close international ally of US president Barack Obama, who was forced to deny he was aware Ms Merkel's phone was tapped.
More recently the role of major technology companies in assisting the collection of data has come under scrutiny with allegations the NSA and its UK counterpart are copying large amounts of data from the fibre optic cables that internet giants such as Google and Yahoo use to communicate between their centres.
This information is likely fed into a NSA program called XKeyscore, which allows NSA staff to search through a vast amount of online information collected through various means.
Details about XKeyscore come from training materials leaked by Snowden, which outline the ease with which the NSA can gather information on a person's online activities if they have access to their email address.
What is Australia's involvement?
Further documents leaked by Snowden revealed details of Australian Government electronic spying throughout the Asia-Pacific region using a series of listening posts stationed in diplomatic missions.
A diplomatic dispute erupted in the region following a story released by Fairfax media, which reported a top-secret map detailing 90 US surveillance facilities at diplomatic missions worldwide - including in Cambodia, China, Indonesia, Malaysia, Myanmar and Thailand.
There have been further embarrassing revelations with the publication of top secret documents obtained by the ABC and Guardian Australia, from material leaked by Edward Snowden, showing details of an Australian intelligence operation to monitor the mobile phone of Indonesian president Susilo Bambang Yudhoyono over 15 days in August 2009.
The documents indicate that Australian intelligence sought a long term strategy to continuing monitoring the president's calls. Also on the leaked "Leadership Targets" list were the president's wife, the current and former vice presidents of Indonesia and other key figures in the President's inner circle.
The intelligence operation was conducted by the Australian Signals Directorate (ASD).
Leading intelligence academic and author Professor Des Ball of the ANU says Australia is party to the UKUSA intelligence agreement, also known as the Five Eyes - which divides the globe into collection areas. Australia has responsibility from the mid-Indian Ocean across to the western Pacific and northwards into southern China.
The UKUSA agreement was borne out of intelligence sharing between the US and the United Kingdom in World War II and extended to include Australia, Canada and New Zealand.
Its existence was allegedly so secret that prime ministers were unaware of the agreement until 1973 - the same year the Commonwealth raided ASIO in a shake-up of security agencies.
Professor Ball says the NSA receives intelligence from four key facilities in Australia that are part of the XKeyscore program.
One Snowden NSA document specifically mentioned operations taking place at "Australian diplomatic facilities", and alleges the ASD operated the listening posts from the embassies without the knowledge of most of the diplomats stationed there.
It also emerged that Australia and the US used the 2007 Bali Climate Change Summit to collect phone numbers of security officials in Indonesia.
The details are said to be in a January 2008 report from the NSA's Australia station at Pine Gap, a facility operated jointly with the CIA and the Australian Defence Department.
What is the Australian Signals Directorate?
While ASIO and ASIS most often spring to mind when thinking of Australian intelligence, the NSA monitoring scandal involves the Australian Signals Directorate (ASD) - an organisation within the Defence Department.
Employing more than 2,000 military and civilian staff, with an undisclosed budget believed to exceed several hundred million dollars a year, ASD is Australia’s largest, most secretive intelligence agency.
But this shadowy world is less James Bond, more mathematician, with ASD employing technicians, analysts, code-breakers and linguists to operate what amounts to a vast digital vacuum cleaner, pulling in data from the ionosphere and cable networks.
From phone calls to near-obsolete faxes, ASD has the capability see, hear or read it all.
Its network includes large facilities near Geraldton, Darwin and Canberra, listening stations concealed within Australian embassies and consulates throughout the Asia-Pacific region, and remotely controlled outposts at Bamaga on the tip of Cape York and the Cocos Islands.
ASD also has a team at Pine Gap, the US facility, located in central Australia, and jointly operated by the NSA and the Central Intelligence Agency.
The onset of the digital age has only served to extend ASD's capability and accelerate the scale of collection, with banks of harvested metadata reportedly stored and processed at a new purpose built ASD facility at HMAS Harman near Canberra.
ASD is regarded by many senior Washington officials as Canberra’s most valuable contribution to the US-Australian strategic alliance.
The ASD's motto is "Reveal their secrets, protect our own", so it is unsurprising it has been involved in the widespread data collection.
In recent years, ASD has partly emerged from the shadows to promote its other role in protecting Australian government communications. It also advises Australian businesses on protecting themselves from cyber-security threats.
However, its primary mission - targeting the diplomatic and military communications of neighbouring countries - remains highly classified.
The Snowden revelations that Australia has been spying on its neighbours from diplomatic missions have predictably been met with outrage from the countries named in the reports – despite journalists and academics progressively revealing details of these activities since the 1980s. Professor Ball says an earlier diplomatic spying operation was conducted under the codename Reprieve, which intercepted local phone calls relayed by microwave link.
In 1988, details first emerged of another more sophisticated global eavesdropping system Echelon, which gave the UKUSA partners, including Australia, global access to satellite and phone communications.
In 1995 the ABC and the Sydney Morning Herald revealed a highly sophisticated joint US-Australian operation to bug the newly constructed Chinese Embassy in Canberra. So sensitive was this mission that prior to publication - and despite widespread knowledge of the bugging in diplomatic circles - the Australian government unsuccessfully attempted to suppress media publication of the operation.
What has the regional reaction been to the Snowden revelations?
Prime Minister Tony Abbott would not be drawn on the latest revelations of ASD spying on the Indonesian president, telling the Australian Parliament that all governments gather intelligence and Australia only uses the information to help allies.
But Mr Yudhoyono's reaction was swift: he recalled Indonesia's ambassador to Australia, and issued a series of scathing tweets accusing the US and Australia of "wounding the strategic partnership with Indonesia."
Former Australian diplomat Bruce Haigh says the public revelations of Australian spying mean Indonesia has lost face.
But he says Australia's relationship with Indonesia is quite strong and "will survive" the revelations.
Former defence intelligence analyst turned independent Federal MP Andrew Wilkie said "we've got to be realistic here".
"The foreign intelligence services of Australia and, in fact, near on every other country in the world conduct intelligence collection operations against foreign targets. In a perfect world, that wouldn't happen, it wouldn't be necessary, it wouldn't go on. But it is not a perfect world and it does have to happen and it does happen."
Responding to the earlier revelations that Australia had used its embassies for signals intelligence gathering, Malaysia summoned the Australian ambassador to express its discontent over the allegations, while China publicly warned foreign embassy staff it was illegal to engage in monitoring activities.
Since the Bali bombings Australia and Indonesia have increasingly shared intelligence in the fight against regional terrorism, but after failing to secure answers from the Australian or US governments, Dr Natalegawa has signaled this intelligence sharing will be reviewed in light of the scandal.
Australian Foreign Minister Julie Bishop has so far refused to comment on the allegations, saying she will not publically discuss intelligence matters, but the allegations overshadowed her trip to Indonesia for the Bali Democracy Forum.
What is the problem with intercepting communications - isn't this what spies do?
Despite the vocal protests from governments around the world, the contents of the Snowden leaks are unlikely to have come as a surprise to leaders and government decision makers.
Much of the reaction stems from the embarrassment of the spying being made public – with leaders such as Ms Merkel likely reacting more to placate domestic audiences.
Former Mexican president Vicente Fox, free from the constraints of office, offered perhaps a more honest answer to the impact of the allegations saying "of course" he was spied on when he was in power.
"It's nothing new that there's espionage in every government in the world, including Mexico. I don't understand the scandal," he told a Spanish radio station.
However, the scale of the data collected, both on US citizens and globally, raises serious questions about the need to address the new realities of the information age.
The amount of recorded information on individuals is greater and has more potential to do harm than ever before, and technology has removed the barriers of scale that previously hampered mass surveillance.
For the first time tools exist to make sense of the vast swathes of information collected and to tie that information to an individual.
The implications for Australians also likely go beyond the NSA's program. Professor Ball says he expects the ASD is gathering similar information on Australian citizens.
Why did Indonesia make such a big deal about the embassy story?
Sam Roggeveen, the editor of the Lowy Institute's Interpreter magazine, and a former Australian government intelligence analyst, offers his thoughts on why Indonesia has reacted this way:
Last week I admitted to being a bit baffled by the Indonesian government's decision to make such a big deal about a minor Australian news story on electronic eavesdropping from Australian diplomatic facilities
If anything, the Indonesians have escalated the dispute since then, with foreign minister Natalegawa saying the row may threaten cooperation on people smuggling, and some Indonesian MPs taking the opportunity to create mischief.
Given that the sort of intelligence activity described in the original Fairfax story is common knowledge, why is Indonesia making a fuss?
A run-down of the various theories, some of which have appeared in the media and others which I have heard privately:
1. Softening Australia up. This one is courtesy of former Lowy Institute executive director Michael Wesley in The Guardian:
Natelagawa, who studied in Australia, has probably watched the odd State of Origin game. He knows the first 10 minutes of the match are known as the "softening up period" - a stanza of ferocious physicality in which each side tries to cow the opposition into a disadvantageous state of mind. Right now, there's a new government in Canberra, and neighbouring governments are likely to be keen to test its mettle. The odd diplomatic jab can give a better sense of what can be expected from a new government than years of polite cocktail discussions.
2. SBY has a grudge. This theory holds that, although Dr Natalegawa is taking the lead on this issue, it is at the direct instruction of president Susilo Bambang Yudhoyono, although his motives are unclear.
3. Mr Natalegawa is making up with his boss. This theory holds that SBY was displeased that Dr Natalegawa allowed a transcript of his New York meeting with Ms Bishop to be leaked (it was the leaking that upset him, not the damage to the Australia relationship). Dr Natalegawa has seized on the spying issue so that he can appear statesmanlike and get back in SBY's good books.
4. The domestic audience. As reader Neil Watson said last week: "We can expect more of this in the run up to next year's presidential election. I'd suggest SBY is also pre-empting the xenophobes in the parliament and 'think tanks' who will be demanding firm measure. It is also a diversion from the corruption allegations surrounding the Democrat Party."
5. The colonial legacy. Ian Brownlie, in his reader riposte earlier this week, argued that "the particular factor in Indonesia's case is the knee-jerk sense of victimhood from exploitation by wealthier, stronger outsiders seen subconsciously or consciously as neo-colonialist invaders. The Germans may admit that spying is something they also do; for Indonesians, it can only be something that others do to them".
6. Indonesia is angry with Australia. Last, let's not ignore the possibility that Indonesia is genuinely annoyed with Australia. It is one thing to know that spying goes on, but another to be confronted with specific facts about foreigners snooping on you in your own capital.
Mr Roggeveen's analysis first appeared on the Lowy Institute's Interpreter website.