Wikileaks founder Julian Assange | Photo Credit: AP

WikiLeaks founder Julian Assange on Friday testified in his legal case against a Spanish private security firm that he claims spied on him while he was holed up in the Ecuadoran embassy in London. Assange, who is currently serving time at a high-security prison in Britain, was to answer questions from a judge at Spain's National Court in Madrid, testifying by videoconference from Westminster Magistrates Court in London, his legal team said.

Spain's top criminal court is investigating whether Undercover Global Ltd, which was responsible for security at the embassy, spied on Assange and passed on information to the United States.

The case is key to Assange's efforts to fight an extradition request by the US Justice Department which is pushing to have him put on trial for leaking hundreds of thousands of secret US military and diplomatic documents in 2010.

"The case being investigated in Spain states that Mr Assange has been subjected to widespread interference on a massive scale by the American authorities, violating his confidential communications with his lawyers, among other rights," his legal team said.

"The information gathered by this firm -- through the alleged use of video cameras which also captured audio, hidden microphones, copying identity documents, monitoring the electronic devices and mobile phones of visitors, among other things -- ended up in the hands of the US intelligence services."

There was a "huge body of evidence" to back the claim, coming from both company data as well as from protected witnesses who were formerly employed by the firm, the source said.

As well as installing cameras, Undercover Global is suspected of installing microphones in places as diverse as the base of a fire extinguisher and in the women's toilets, where Assange held many meetings for fear of being spied on.

- 'Britain must refuse extradition' -

They were allegedly able to record discussions with his lawyers as well as details of medical visits, with the information then transferred to servers that were accessible to the US intelligence services.

Assange took refuge inside the Ecuadoran embassy in 2012, fleeing what he claimed was a politically-motivated extradition order for his return to Sweden for questioning in a sexual assault case, which was dropped last month.

After Quito gave him up in April, Assange was arrested and is currently serving 50 weeks in a London jail for breaching his bail conditions when he entered the embassy.

The 48-year-old is also fighting a request to extradite him to the United States where he faces 18 charges, mostly relating the obtention and dissemination of classified information over WikiLeaks' publication of military documents and diplomatic cables.

His legal team said that given the alleged spying at the embassy, it "underlines the need for the British judicial system to refuse to hand him over to the United States" where there were no guarantees for his safety.

Friday's hearing came at the request of the National Court, which is investigating both Undercover Global and its owner David Morales, who was arrested in September but is out on conditional release.