Ecuador has found a hidden microphone inside its London embassy where the WikiLeaks founder Julian Assange is living.
Foreign minister Ricardo Patino, speaking in his home country, said he would disclose on Wednesday who controls the device.
Mr Patino said the microphone was found in the office of the Ecuadorean ambassador to the United Kingdom, Ana Alban.
It was discovered when Mr Patino visited the embassy on June 16 to meet Mr Assange, who has been hiding out there for a year.
The WikiLeaks boss works in a different room within the building.
The Foreign Office in London declined to comment immediately on the allegation and David Cameron's spokesman said he did not comment on security issues.
Mr Assange has been living at the embassy to avoid extradition to Sweden to face allegations by two women of sexual assault and rape, which he denies.
He fears that if sent to Sweden he could be extradited from there to the US to face potential charges over the release of thousands of confidential documents.
"We regret to inform you that in our embassy in London we have found a hidden microphone," Patino told a news conference in Quito on Tuesday.
"I didn't denounce this at the time because we didn't want the theme of our visit to London to be confused with this matter.
"Furthermore, we first wanted to ascertain with precision what could be the origin of this interception device in the office of our ambassador.
"We are sorry to say so, but this is another instance of a loss of ethics at the international level in relations between governments."
Ecuador's protection of Mr Assange has strained relations with Britain.
Mr Patino met Foreign Secretary William Hague on June 17 to discuss the situation but officials said afterwards no substantive progress had been made.
WikiLeaks used its Twitter account to condemn the hidden microphone.
"Bugging of Ecuador's London embassy and the blockading of Morales' jet shows that imperial arrogance is the gift that keeps on giving," the anti-secrecy group said.