Before appearing in the Trump-Russia probe, Felix Sater traveled throughout Central Asia gathering intelligence on the Taliban for the U.S. government, according to a decade-old court filing unsealed Friday.

In 1998, the Russian-American businessman began cooperating with the U.S. government after pleading guilty to participating in a $40 million stock-fraud case involving New York mafia figures.

After entering his plea, Sater spent years working hand-in-hand with the CIA and the FBI to target New York organized crime families and Al Qaeda, according to a 2009 letter filed by prosecutors requesting a reduced sentence for Sater due to his cooperation. The judge obliged, assigning him a $25,000 fine and no prison time.

“[T]he agents who worked with Sater found him to be dependable, insightful, and hard-working,” the letter said.

Sater drew immense public interest during Special Counsel Robert Mueller’s investigation of links between the Trump campaign and Russia because Sater helped President Donald Trump’s former lawyer Michael Cohen negotiate a deal to build a Trump Tower in Moscow. Those talks unfolded secretly in the heat of the 2016 presidential campaign, even as Trump publicly claimed he had “nothing to do with Russia.” In an eye-popping email, Sater even told Cohen that Russian President Vladimir Putin could help Trump win the election if the deal went through.

Sater, unsurprisingly, drew scorching criticism for this activity. But he has defended himself by claiming to be a patriot who worked closely with American spies at great personal risk. The filing by federal prosecutors, known as a 5K1 letter, indicates there is some truth to those claims.

Benton Campbell, the then-U.S. attorney for the Eastern District of New York, sent the letter on August 27, 2009 to Judge Leo Glasser, who presided over Sater’s case.

U.S. officials have alluded in the past to Sater’s cooperation. In her Senate confirmation hearing to be attorney general in 2015, for instance, Loretta Lynch praised his work with the Justice Department. But the newly unsealed letter is the most detailed statement from the feds on Sater’s work for Uncle Sam.

The letter begins by describing a serendipitous find: In an abandoned storage unit that police seized in January 1998, someone had left loaded guns and documents detailing the criminal enterprise that Sater was involved in. Sater was overseas at the time. When he learned law enforcement were looking for him, he immediately contacted American intelligence officers, and, in an effort to shore up goodwill, offered information about Afghanistan’s Northern Alliance, which was fighting the Taliban.

U.S. intelligence officials took him up on the offer, and he spent the spring and summer of 1998 traveling through Central Asia and gathering information about the Northern Alliance, including details on their interest in selling Stinger anti-aircraft missiles to the U.S. (including those missiles’ serial numbers), as well as information about the Taliban and Al Qaeda leader Osama bin Laden.

That year, he got in touch with an ex-KGB officer-turned-arms dealer who had information about threats to the U.S. emanating from Central Asia and Afghanistan. Sater shared the arms dealer’s information with the CIA and the FBI. The contact told Sater about the missiles, as well as what was believed to be bin Laden’s satellite phone number and information about the people who supplied the terrorist leader with weapons.

Sater also worked with a precious stones dealer who had Taliban contacts. The FBI paid for a phone that Sater sent to the dealer, according to the letter. The two used it to stay “in constant contact.” That individual shared ample information with Sater that he passed on to the U.S. government, including details on bin Laden’s location after the September 11 attacks, information on Al Qaeda’s structure and finances, the purported location of Taliban leader Mullah Omar, details on the casualties of U.S. airstrikes, details on a plot to assassinate President George W. Bush, and information on North Korea’s nuclear capabilities.

The letter notes that Sater traveled to dangerous parts of Central Asia to gather much of this information.

In December 1998, Sater returned to the U.S., surrendered, entered a guilty plea, and explained to prosecutors the significance of the storage unit’s contents.

And he kept cooperating.

Sater shared detailed information with the prosecutors about organized crime in New York. Most importantly, prosecutors said he helped them secure the conviction of Frank Coppa Jr., a member of the Bonanno crime family. A footnote in the letter notes that Coppa then began cooperating, which led to the conviction and cooperation of Joe Massino, the boss of the Bonanno crime family. Massino’s subsequent cooperation with the feds was historic: one federal judge said he “may be the most important cooperator in the modern history of law enforcement efforts to prosecute the American Mafia.”

Sater also helped the feds investigate access device fraud and money-laundering schemes that started in Russia, according to the letter.

The letter concludes with a full-throated endorsement of Sater’s work.

“Felix went above and beyond what is expected of most cooperators and placed himself in great jeopardy by so doing,” it said.