Uber spied on and bribed foreign officials, infiltrated private chat groups, stole trade secrets, and abused secret messaging apps and attorney-client privilege to obstruct government investigations, according to a former employee.

Those are just some of the allegations laid out in a 37-page letter written by a lawyer for the former Uber security analyst, Richard Jacobs, on May 5, 2017. A partially redacted version of the letter was made public in a court filing on Friday afternoon as part of an ongoing lawsuit.

Uber is being sued by Waymo, Alphabet's self-driving car unit that was formerly part of Google, for allegedly stealing trade secrets.

Waymo claims in their suit that a former employee downloaded confidential files from servers, just before going to work for Uber as part of the unit developing its own autonomous vehicle.

The ride-hailing company on Friday said it was aware of the allegations made in the letter.

Related: Lawyer to Uber: turn over data on rape, assault reports from riders

"While we haven't substantiated all the claims in this letter-and, importantly, any related to Waymo-our new leadership has made clear that going forward we will compete honestly and fairly, on the strength of our ideas and technology," an Uber spokesperson said in a statement.

The letter was originally sent to Uber from Jacobs' lawyer. He had worked as a security analyst for Uber until April of this year when he resigned after being demoted. He says he was demoted for "raising objections to and refusing to participate in unlawful activity." But, a Uber manager testified that he was fired for "performance reasons."

In a hearing this month, Uber's deputy general counsel called Jacobs demands "extortionate."

Related: Uber moves to settle rape victim's lawsuit

Uber testified the company paid Jacobs a settlement of $4.5 million to not reveal his accusations publicly.

In an unusual move, the Department of Justice alerted the judge overseeing the lawsuit, William Alsup, to the existence of the letter on November 22. By sharing it with Judge Alsup, the DOJ revealed that Uber is the subject of at least one criminal investigation, a court document released this Wednesday confirmed. No details about the investigation have been made public. The Department of Justice declined to comment.

Related: Uber and Waymo square off in court over self driving tech

The letter caused the judge to delay the Waymo trial, which was supposed to begin jury selection November 29. Now jury selection is scheduled to start January 31. A report filed by special master John Cooper on Friday says Uber erred by not sharing the letter earlier. That means it is possible a jury could be told Uber withheld evidence.

"Uber improperly withheld the Jacobs Letter, which exposes the extreme lengths it was willing to go both to get a leg up on competition and hide evidence of bad acts. Separate and apart from the letter, Waymo has accumulated significant evidence that Uber is using stolen Waymo trade secrets, including copying aspects of Waymo's LiDAR designs down to the micron, and we look forward to trial," said a Waymo spokesperson in a statement.

Here are some of the allegations detailed in the letter by Richard Jacobs, the former Uber security analyst:

--Uber used CIA-trained independent contractors to collect foreign intelligence, Jacobs alleges. He says they conducted "foreign espionage against a sovereign nation" (the country's name was redacted) and collected metadata from the mobile phones of "opposition figures, politicians and government regulators." Uber also recruited undercover agents and infiltrated closed social media groups for taxi drivers and drivers working for competing companies, according to Jacobs.

--Jacobs writes that his former company bribed foreign government officials, according to the letter. Jacobs claims Uber was targeting officials and gathering information that could ease enforcement activities or help Uber unblock markets.

--Uber "implemented a sophisticated strategy to destroy, conceal, cover up, and falsify records or documents," says the letter. The company allegedly used a combination of disappearing messaging apps, untraceable computers, and excessive use of attorney-client privilege to impede government investigations and avoid discovery obligations, says the letter.

--Uber conducted surveillance of executives from a competing company, recording video and audio at private events in locations like hotels, according to the letter. In one example, Uber's contractors recorded a private conversation between executives as they learned Uber was going to receive $3.4 billion in funding from the Saudi government. Jacobs says the human surveillance was directed by former chief security officer Joe Sullivan on behalf of then CEO Travis Kalanick. Kalanick did not immediately respond to a request for comment. Sullivan released a statement saying, "From where I sat, my team acted ethically, with integrity, and in the best interests of our drivers and riders."

--The letter says Jacobs was aware that the company stole trade secrets "from at least Waymo," but he walked back that claim during a pre-trial hearing for the Waymo case on November 28 saying, "I don't stand by that statement." Jacobs said during the hearing that he only had 20 minutes to review the letter before it was sent. He did not respond to a request for comment.

Uber has installed a new CEO who is attempting to change the company's culture. On November 29, Uber's new general counsel Tony West sent an email to the security team saying there was no place at the company for surveillance practices.

"We don't need to be following folks around in order to gain some competitive advantage. We're better than that," he wrote. "To be crystal clear, to the extent anyone is working on any kind of competitive intelligence project that involves the surveillance of individuals, stop it now."

Updated Dec. 18 to add additional comments.