SAN FRANCISCO (Reuters) - Ride hailing company Uber was obligated to turn over to a U.S. federal judge a letter from a former employee that told of the company’s “fraud and theft” and mentioned evidence of stolen trade secrets nailed “like a scalp” to the wall, a court official said Friday.

FILE PHOTO - The Uber logo is seen on a screen in Singapore August 4, 2017. REUTERS/Thomas White/File Picture

Special master, John Cooper, assigned to a lawsuit against Uber Technologies Inc [UBER.UL] by Alphabet Inc's GOOGL.O self-driving car unit, Waymo, released a report on Friday stating the company should have produced the letter and was wrong in keeping it from the court.

The letter, from former Uber security analyst Richard Jacobs alleging Uber engaged in illegal and unethical competitive tactics and had stolen trade secrets, is at the heart of Waymo’s lawsuit against Uber.

The letter was sent to Uber’s in-house lawyer in May and shared with executives and board members, who could easily access it, special master Cooper said in his report.

“This needle was in Uber’s hands the whole time,” he said.

Cooper’s determination marks another setback for Uber in a case in which the judge has blamed Uber for withholding evidence and masterminding a coverup.

U.S. District Judge William Alsup will determine what, if any, consequences Uber faces for not turning over the letter.

The 37-page letter from Jacobs was released publicly for the first time Friday, partially redacted, although its contents had been discussed in detail during court testimony last month.

Because Uber had not disclosed it, the letter turned up just last month when the U.S. Department of Justice notified Alsup about it. The Justice Department has opened a criminal investigation into the matter.

Waymo sued Uber in February, alleging it had stolen trade secrets from Waymo’s self-driving car designs, and estimates damages in the case at $1.9 billion. Uber has said no Waymo designs have been used in its cars and rejects the financial damages claim.

In the letter, written by Jacobs’ lawyer, the ex-Uber employee said Uber’s security team had a unit that “exists expressly for the purpose of acquiring trade secrets, codebase, and competitive intelligence,” and a second unit that “frequently engages in fraud and theft.”

His letter says that Uber stole trade secrets from Waymo, but in court testimony last month he recanted that statement.

Jacobs’ letter also describes surveillance operations in which Uber employees bugged meetings with transportation regulators and recorded executives of rival companies, and says that former Uber CEO Travis Kalanick directed these operations.

In a statement on Friday, Uber said it has not substantiated all of the claims in Jacobs’ letter, but “our new leadership has made clear that going forward we will compete honestly and fairly, on the strength of our ideas and technology.”

Dara Khosrowshahi replaced Kalanick as CEO in August, and has been critical of Uber’s behavior under its old leader.

Jacobs named Mat Henley, who is on medical leave from Uber, Nick Gicinto, a manager on the security team, as instrumental in Uber’s clandestine intelligence-gathering operation. Security chief Joe Sullivan, and legal director Craig Clark, who were both fired last month for their role in concealing a massive data breach, were also involved, the letter said.

Sullivan said in a statement on Friday his team “acted ethically” and an attorney for Clark said has he “acted appropriately at all times.”

Matthew Umhofer, an attorney for Henley, Gicinto and other members of Uber, said: “Jacobs’ letter is nothing more than character assassination for cash.”

Jacobs was forced to resign in April after a demotion, and sent the letter the following month. He struck a deal with for Uber a $7.5 million settlement, and Jacobs continues to work for Uber as a consultant.