The US government is wrong to charge WikiLeaks founder Julian Assange with publishing unredacted classified documents because they had already appeared online, a London court has heard.
Computer scientist Professor Christian Grothoff said the organisation was not the first to make public 251,000 diplomatic cables when they appeared on its website on September 2, 2011.
Assange, 49, is fighting extradition to the US, where he is facing an 18-count indictment alleging a plot to hack computers and conspiracy to obtain and disclose national defence information.
Prosecutors claim the Australian put the lives of sources and informants around the world at risk by publishing their names.
Prof Grothoff, of the Bern University of Applied Sciences in Switzerland, told the Old Bailey the unredacted cables came into the public domain following the publication of a passcode in a book by Guardian journalists in February 2011.
At the end of August, it was discovered the code could be used to decrypt a mirrored version of the WikiLeaks online encrypted store of cables before the full cache - including classified documents - was made available through torrents and the Cryptome website on September 1, he said.
"It was actually available on the internet in a way that would be virtually impossible to stop," Prof Grothoff told the court, giving evidence by video link.
But his impartiality was called into question by the US government when it emerged he had signed a 2017 letter to Donald Trump urging the president not to charge Assange or other WikiLeaks staff.
Prof Grothoff said he did not remember signing the letter but described Assange as a "sympathetic character" because of his role in exposing "war crimes".
Joel Smith, for the US government, suggested: "You are biased, you are partial?"
Prof Grothoff replied: "No, I believe that looking at the indictment put forward, you're confusing actions WikiLeaks took to hide and obscure the documents with them publishing it.
"On the very specific technical point where you say WikiLeaks published those cables you are wrong, and you didn't properly do your homework to find who first published those cables.
"So I think it's unfair for you to accuse Mr Assange of publishing those unredacted classified cables.
"The primary publisher of the unredacted cables wouldn't be WikiLeaks."
The hearing, which entered its third week on Monday, continues.
Australian Associated Press