Iran is threatening legal action against New Zealand after learning the Security Intelligence Service (SIS), in a joint operation with the CIA, broke into its Wellington embassy to plant bugs in the late 1980s and early 1990s.
India has also hit back at an SIS operation that occurred during the same era, demanding New Zealand's foreign ministry investigate an SIS break-in where code books were photographed and passed on to Britain's MI6.
The protests from Iran and India have been revealed in an epilogue episode of the RNZ podcast series The Service, which tracks the role of the SIS in the Cold War.
The podcast focuses on a break-in to the Czechoslovakian embassy in 1986 - a joint mission by the SIS and MI6 to steal the Warsaw Pact codes used to encrypt the communications of the communist eastern bloc countries.
But, following the podcast, RNZ discovered the New Zealand spy agency had conducted a series of embassy break-ins which continued at least into the 1990s.
The SIS raided the Iranian embassy in Wellington in a mission named Operation Horoscope, which was driven by the CIA.
The SIS entered the embassy for the CIA, photographed the building and installed listening devices supplied by the CIA.
The CIA altered circuit boards on a telex machine used by the Iranian embassy, allowing the CIA to intercept communications.
The Iranian Embassy in Wellington said it was investigating the raid as a breach of international treaty the Vienna Convention, which states that the "premises of the mission shall be inviolable".
In a written response to RNZ, Iran said: "In case such a violation is proven the government of the Islamic Republic of Iran, with due respect to the 50-year-old bilateral relationship with the Government of New Zealand, reserves its right to take any legal action."
The statement said that "investigating the evidence and signs of the alleged action is in progress" and "in case of obtaining any confirmed evidence the necessary legal action will be taken".
The statement also said the countries have had "brilliant relations" over almost 50 years and such a violation would not seem rational. It also stated that "given (New Zealand's) political independence," the idea that the operation was driven by the CIA seems "unrealistic".
The Indian High Commission told RNZ it had also taken action on the SIS raid on its embassy. "I can confirm to you that the matter has been taken up with the NZ Ministry of Foreign Affairs and Trade, requesting them to look into the matter."
The covert attack on the Indian High Commission was code named Operation Dunnage and was a joint mission between the SIS and Britain's external spy agency MI6. Thousands of photographs containing codes were sent back to the UK to allow British Foreign Intelligence officials to decipher the communications of Indian government officials and diplomats.
Former prime ministers Jim Bolger and Sir Geoffrey Palmer have both said they had no recollection of signing off on the embassy break-ins.
The Ministry of Foreign Affairs told RNZ it will not talk about the embassy break-ins at all. "MFAT has no comment to make on these matters. New Zealand maintains constructive and positive relationships with Iran and India including their representatives based in Wellington."
The SIS has not denied the events but said it was "unable to respond to questions about what may or may not be specific operational matters".
Both Helen Clark, prime minister between 1999-2008, and the current Minister for the SIS Andrew Little have refused to say whether the SIS still breaks into foreign embassies.