A former National Security Agency employee from Colorado is accused of trying to sell classified information to a hostile foreign government in an attempt to pay off his debts and "help balance" the world's scales, according to court documents released Thursday.

But while Jareh Sebastian Dalke, 30, believed he was talking to a representative of a particular nation "with many interests that are adverse to the United States," he was actually talking to an undercover FBI agent, according to his arrest affidavit. After initially sharing excerpts of classified documents and one full document this summer, Dalke was arrested Wednesday after he allegedly agreed to transmit more information using a secure connection investigators had set up at Denver's train station.

Dalke, who is charged with three violations of the Espionage Act, appeared in Denver federal court Thursday. He is being represented by a lawyer from the federal public defender's office, which does not comment publicly on their cases.

FBI ALLEGEDLY ENGAGING IN ‘PURGE’ OF CONSERVATIVE EMPLOYEES, RETALIATING AGAINST WHISTLEBLOWERS: JIM JORDAN

The arrest affidavit did not identify the country Dalke allegedly believed he was providing information to, but it noted that he speaks basic Spanish and Russian and that he tried to verify that the undercover agent was actually working for the foreign government, rather than "americans (sic) trying to stifle a patriot," by using a website for the Russian government’s external intelligence agency.

Dalke also requested that the agent verify their association with the foreign government by posting on an official website or through a report in one of the media services associated with its government, the arrest affidavit said.

Government secrets

A sign representing the National Security Administration campus is seen in Fort Meade, Maryland, on June 6, 2013.  (AP Photo/Patrick Semansky)

Dalke, an Army veteran who lives in Colorado Springs, worked for the NSA, the U.S. intelligence agency that collects and analyzes signals from foreign and domestic sources for the purpose of intelligence and counterintelligence, as an information systems security designer for less than a month this summer, according to the affidavit.

According to his arrest affidavit, Dalke, who has degrees related to cybersecurity, began communicating by encrypted email with the undercover agent in late July after the agent wrote to him saying the agent had been informed that they should talk about "items of mutual benefit." At one point, Dalke allegedly told the agent that his heritage "ties back to your country," which is why he said he has "come to you as opposed to others", it said.

The documents he shared before his arrest included a threat assessment of the foreign government he believed he was helping, a plan to update a cryptographic program for a federal agency, a threat assessment of sensitive U.S. defense capabilities, some of which relate to the foreign government at issue, and a document related to a "foreign government leader" whose identity or nation is not described, according to the arrest affidavit.

SPECIAL MASTER TAPS RETIRED JUDGE WITH ‘TOP SECRET’ CLEARANCE TO AID IN REVIEW OF SEIZED MAR-A-LAGO RECORDS

According to the document, Dalke told the undercover agent that he had $237,000 in debts. In 2017, he filed for bankruptcy because of student loan and credit card debts, it said. He allegedly told the undercover agent that providing the classified information for payment was "an opportunity to help balance scales of the world while also tending to my own needs."

At another point, Dalke said that he did not think the United States is as great as it thinks it once was, the affidavit said.

TRUMP-PICKED SPECIAL MASTER CANDIDATE SIGNED CARTER PAGE WARRANT BEFORE FBI MISCONDUCT DISCOVERED

"It is all about the businesses and their money, not anything about the people or those that serve it to include the military," he said, according to the document.

The case is the latest prosecution involving a government worker accused of trying to pass classified information to someone they thought was a foreign government representative. Jonathan Toebbe, a Navy nuclear engineer, was arrested along with his wife, Diana, in October 2021 on charges of trying to sell submarine secrets to a foreign government. Both have pleaded guilty and are awaiting sentencing.