SAN FRANCISCO — A former Uber security specialist accused the company of dispatching a team of spies to steal its rivals' trade secrets and using shady tactics to thwart its competition in the ride-hailing market, according to an inflammatory letter unsealed Friday by a federal judge.

Those tactics allegedly included impersonating other people, illegally recording conversations and hacking into computers.

Former Uber manager Richard Jacobs, who was fired earlier this year, made the explosive claims in a 37-page letter that sought a big payoff for being forced out of the company. The letter, written by a lawyer on Jacobs' behalf, has already reshaped a high-profile trial pitting Uber against Waymo, a Google spin-off that accuses its rival of stealing its self-driving car technology.

The letter also has become evidence in a criminal investigation being conducted by the U.S. Justice Department. U.S. District Judge William Alsup, who is overseeing the Waymo-Uber case, took the unusual step of recommending that federal prosecutors consider a criminal probe, based on the evidence and testimony that he had reviewed long before he knew about Jacobs' letter.

Although most of Jacobs' most damaging allegations were aired in court hearings held two weeks ago, the letter's release sheds more light on the no-holds-barred culture that former Uber CEO Travis Kalanick encouraged. The scandals spawned by that freewheeling culture have now become a major source of embarrassment for Uber as it tries to recast itself as more compassionate and better-behaved company under a new management team led by Dara Khosrowshahi.

Related: Uber’s former security head alleges company hired ex-CIA agents to spy on rivals

Over the past year, Uber has been rocked by revelations of rampant sexual harassment inside the company, technological trickery designed to thwart regulators and a yearlong cover-up of a hacking attack that stole the personal information of 57 million passengers and drivers.

"While we haven't substantiated all the claims in (Jacobs') letter — 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," Uber said in a Friday statement.

Many of the names and some of the information in Jacobs' letter have been redacted. Jacobs' legal team persuaded Alsup to allow those deletions to protect the identities of former CIA agents that worked with Uber's espionage team, a since disbanded unit called Marketplace Analytics.

Waymo unveils a self-driving Chrysler Pacifica minivan during the North American International Auto Show in Detroit on Jan. 8, 2017.

The letter alleges that two Uber security executives, Joe Sullivan and Craig Clark, played central roles in putting together the company's clandestine operations. Marketplace Analytics allegedly targeted overseas rivals and Waymo in the U.S. while creating a network of secret communications channels and alternate devices designed to cover their digital tracks and avoid legal trouble.

Uber fired both Sullivan and Clark for paying $100,000 to two hackers who stole the personal information of drivers and passengers — and then covering up the theft.

Uber itself tried to hack into its rivals' computer networks in an effort to scoop up valuable information, Jacobs' letter alleges. In some instances, its agents impersonated drivers and riders on its competitors' services to gain insights.

Related:Uber paid hackers, hid data breach affecting 57 million people

The letter also alleges Uber regularly broke California law by making unauthorized recordings of phone conversations, including at least one involving a sexual harassment complaint made ay a former employee.

Sullivan defended himself and the rest of his security team in a statement. "From where I sat, my team acted ethically, with integrity, and in the best interests of our drivers and riders," he said.

Clark "acted appropriately at all times," said his attorney, Mark Howitson.

Matthew Umhofer, an attorney representing several other Uber security team members fingered in the letter, derided the document as "nothing more than a character assassination for cash."

Uber wound up reaching a $7.5 million settlement with Jacobs and his lawyer, Clayton Halunen, even though one of the company's top attorneys considered Jacobs' letter to be little more than blackmail.