Australian spy agency the Defence Signals Directorate worked alongside America’s National Security Agency in mounting a massive surveillance operation on Indonesia during the United Nations climate change conference in Bali in 2007.

The newly-elected prime minister Kevin Rudd was making his first high-profile international foray at the conference, at the personal invitation of Indonesian president Susilo Bambang Yudhoyono.

A new document from whistleblower Edward Snowden reveals the intelligence agencies were trying to collect the phone numbers of Indonesian security officials.

It was not a particularly successful mission – the only tangible outcome the NSA and the DSD could boast of for all the expenditure of time, staff and other resources was the mobile phone number of Bali’s chief of police.

But its revelation is likely to exacerbate tensions between Australia and Indonesia, which flared after Fairfax newspapers revealed last week that Australian diplomatic posts across Asia were being used to intercept phone calls and data.

That story prompted the Indonesian foreign minister, Marty Natalegawa, to declare it was "not cricket" for Australia to spy on the region at the behest of the United States and that he had sought clarification from his Australian counterpart Julie Bishop on an important issue of "trust".

"If Australia was itself subjected to such an activity do you consider it as being a friendly act or not? We are deeply concerned and it's something we cannot accept," he said.

''I'm not sure what is the right term in Australian terminology. I guess it's not cricket.''

Indonesia on Friday called in the Australian ambassador in Jakarta, Greg Moriarty, for an explanation.

The revelation that DSD co-operated in spying at the 2007 Bali conference is likely to be particularly galling for Indonesia.

Rudd attended the conference, along with five ministers, just 10 days after he was elected, and at the personal invitation of Yudhoyono, who was the first world leader to call to congratulate the new prime minister.

The conference was seen at the time as something of a diplomatic triumph for the Rudd government, with Rudd highlighting Australia’s new approach to climate change by formally ratifying the Kyoto protocol, personally handing the document to UN secretary general Ban Ki-moon, and using the conference to signal a new diplomatic shift towards Asia.

A detailed account of how the operation was mounted is included in a weekly report from the NSA base at Pine Gap in Australia, one of the agency’s biggest overseas bases.

The report, dated January 2008, deals with surveillance of the climate conference which ran from 3-14 December, attracting 10,000 officials, journalists, activists and others.

Ban described climate change as “the moral challenge of our generation” at the conference and it eventually agreed the “Bali road map” which was supposed to pave the way to an international agreement at the 2009 Copenhagen conference.

But the NSA’s base in Australia, at Pine Gap, was less interested in combating climate change than collecting the numbers of Indonesian security officials in case of a future emergency.

The document says the NSA worked with the DSD “in support of this target”. It adds: “The goal of the development effort was to gain a solid understanding of the network structure should collection be required in the event of an emergency.”

At the DSD’s request, an Indonesian linguist was added to the team to monitor and scan communications.

Summing up at the end of the operation, the NSA said: “Highlights include the compromise of the mobile phone number for Bali’s chief of police.

“Site efforts revealed previously unknown Indonesian communications networks and postured us to increase collection in the event of a crisis.”

Asked about the Fairfax report, based on documents published by German magazine Der Spiegel, the prime minister, Tony Abbott, declined to comment on specifics of intelligence activities, but he insisted any activity carried out by Australian officials was within the law.

"Well, the thing about every Australian governmental agency is that we all operate in accordance with the law," Abbott told reporters on Thursday.

"Every Australian governmental agency, every Australian official, at home and abroad, operates in accordance with the law and that's the assurance that I can give people at home and abroad – our people operate in accordance with the law," he said. "Now, as for the precise workings of our intelligence organisations, it's been a long-standing practice not to comment on them."

Bishop said she would comply with the same practice of not commenting.

German, French and Spanish governments have all reacted angrily to reports based on NSA files leaked by Snowden since June, revealing the interception of communications by tens of millions of their citizens each month. US intelligence officials have insisted the mass monitoring was carried out by the security agencies in the countries involved and shared with the US.

DSD’s motto is “Reveal their secrets: Protect our own.”

A spokeswoman for Bishop repeated that she would not comment on intelligence matters. And a spokeswoman for Kevin Rudd said the former prime minister did not want to comment on the revelations.