A Spanish security firm tailed the mother of Julian Assange's fiancee and illegally recorded hours of footage of their baby son, court documents show.
Stella Moris revealed her identity as the WikiLeaks founder's fiancee on April 11, three days before a London court could lift a non-publication order on her name.
The 37-year-old and Assange had two children while he was seeking asylum and staying in the Ecuadorian embassy in London between 2012 and 2019.
A jailed Assange is now battling in a London court to avoid extradition to the US to face charges of violating spy laws and computer intrusion.
When he was holed up in the Ecuadorian embassy Spanish firm UC Global was providing security there.
But the company was allegedly spying on the Australian and his guests on behalf of the US at the same time.
A criminal complaint against UC Global owner David Morales is currently being probed by Spain's National Court.
Court documents detail the extent of the alleged spying, targeting Moris, her mother and Assange's baby boy Gabriel.
Morales sent an email to staff on September 21, 2017, calling for "special attention on Stella Moris".
He even ordered someone to tail Moris' mother, who the company had discovered was living in the Spanish province of Catalonia.
"If necessary, I want a person fully dedicated to this activity, so if you have to hire someone to do it, let me know," Morales wrote.
"All this has to be considered top secret so the dissemination will be limited."
UC Global had Assange and Morris' son in the cross-hairs as well with Gabriel's visits to the embassy constantly watched.
Hours of footage of the infant stored on company computers were handed to the Spanish court by former employees.
Assange and Moris tried to hide the boy's true identity by having their friend Stephen Hoo bring him for visits and claim he was the father.
But UC Global conducted extensive background checks on Hoo and decided that was a ruse.
A former staff member has given a sworn statement to the Madrid court alleging that Morales was determined to prove that Assange was Gabriel's father.
The protected witness says on one occasion they were even ordered to steal the baby's nappy to conduct a DNA test on his faeces.
A lab told Morales that DNA from the diaper couldn't be used for a paternity test, so he hatched a plan to steal the baby's pacifier, another employee told the El Pais newspaper earlier this week.
But with growing legal and moral concerns about the work, the witness instead decided to tip off Moris.
"I went to the child's mother outside the embassy and asked her please indicate that you will no longer take the child to the embassy because they planned to steal his diapers to prove that he was the son of Julian Assange," the witness' statement says.
UC Global allegedly spied on Ecuadorian diplomatic staff too, indicating Morales was working for the US government, Assange's lawyers say.
When Morales was concerned Ecuador wanted to end the security contract, he tried to use "intimate photos" of a diplomat stolen from her personal hard drive to blackmail Ecuador's foreign intelligence agency SENAIN not to pull out.
"These extremely private photographs were allegedly in the possession of UC GLOBAL, were printed and were part of an extortion report that sought to prevent SENAIN from terminating the contract," Assange's criminal complaint says.
The Australian's legal team says the Spanish evidence proves UC Global helped the US record Assange's intimate life inside the embassy.
That surveillance included audio recordings of his private legal discussions, his lawyers say, which gives the prosecution an unfair advantage in his US extradition trial in London.
Morales has denied all the allegations.
Assange faces 17 charges of violating the US Espionage Act and one of conspiring to commit computer intrusion.
He's accused of publishing thousands of secret US diplomatic and military files, some of which revealed alleged war crimes in Iraq and Afghanistan.
The charges carry a total of 175 years' imprisonment.
Australian Associated Press