A former Defense Intelligence Agency officer was arrested over the weekend by the FBI, charged with trying to ferry U.S. government secrets to Chinese spies and taking at least $800,000 in suspicious funds flowing from China, according to newly unsealed court documents.

Ron Rockwell Hansen of Syracuse, Utah, was arrested Saturday afternoon, capping a four-year FBI investigation that tracked alleged payments and communications with Chinese intelligence agents.

Officials said he was arrested after a sting operation near the Seattle airport, as he was headed toward a China-bound flight.

Assistant Attorney General John C. Demers said that Hansen “allegedly attempted to transmit national defense information to the People’s Republic of China’s intelligence services (PRCIS) and also allegedly received hundreds of thousands of dollars while illegally acting as an agent of China.”

Demers called the conduct described in a criminal complaint against Hansen “a betrayal of our nation’s security and the American people.” Hansen was in federal custody Monday and could not immediately be reached for comment.

Hansen’s arrest is the latest in a flurry of recent espionage cases involving China.

Former CIA officer Jerry Chun Shing Lee was indicted on espionage charges last month, while Kevin Mallory, another ex-CIA officer, is on trial in Virginia on espionage charges.

While there is nothing to indicate that the three cases are connected, all three men are accused of trying to sell secrets for money to relieve financial burdens in their lives.

Hansen, 58, worked as a military intelligence case officer at the DIA from 2000 to 2006, when he retired from the military. Between 2006 and 2011, he did contract work for the DIA, according to the criminal complaint.

The 15-count complaint filed in U.S. District Court in Salt Lake City accuses Hansen of attempting to gather or deliver national defense information to aid a foreign government, acting as an unregistered foreign agent of China, bulk cash smuggling, and smuggling goods from the United States.

The criminal complaint tells a convoluted tale of an FBI investigation that began in 2014, followed by meetings the next year between Hansen and the FBI, in which he described attempts by Chinese intelligence agents to recruit him. Apparently unaware of the bureau’s preexisting investigation of his conduct, Hansen met with FBI agents nine times that year, according to the court document.

“Hansen claimed that he initiated the meetings with the FBI in an attempt to offer his cooperation as a source,” the complaint states. At the end of the discussions, FBI officials said, they warned Hansen not to accept any offers to work for Chinese intelligence officials and to notify the FBI if he heard from intelligence agents again.

The 42-page criminal complaint describes years of suspicious behavior by Hansen, suggesting that his efforts on behalf of China stretch back more than five years.

From 2012 on, Hansen sought at first to get rehired in the U.S. government to a job with a security clearance, but when those efforts failed, he began contacting former DIA colleagues, according to the complaint. He has also repeatedly attended conferences about intelligence issues and has traveled to China 40 times since 2013, officials said.

In 2016, Hansen met with two former DIA colleagues in Texas. At the meeting, Hansen told one colleague that he was “stringing along” Chinese intelligence officials until the FBI decided whether to use him as a “double agent,” according to the complaint.

That colleague became alarmed by Hansen’s references to Chinese intelligence and filed a suspicious-incident report, which prompted the FBI to begin using that person as a confidential source, according to the complaint.

Over time, the complaint said, Hansen spoke more and more with the confidential source about selling information to China, and, in a conversation in April, Hansen said the Chinese would pay $200,000 for the U.S. “China ops plan” for a possible military intervention with China. Hansen also said the Chinese were interested in U.S. secrets about North Korea, the court document said.

Last week, the two agreed to meet Saturday near the Seattle airport so the source could deliver secret documents to Hansen, according to the complaint. After the meeting, in which Hansen allegedly took notes on the contents of the documents, the FBI moved in and arrested Hansen as he walked toward a pedestrian bridge leading to the airport.