A former U.S. intelligence official has been accused of threatening national security by attempting to transmit “secret” information detailing military readiness to China.

Ron Hansen, 58, of Syracuse, Utah, was arrested and charged with attempting to funnel information to China — including a collection of documents related to U.S. Cyber Command — according to a Department of Justice complaint filed in Utah. Hansen faces a maximum sentence of life in prison.

“His alleged actions are a betrayal of our nation’s security and the American people and are an affront to his former intelligence community colleagues,” said Assistant Attorney General for National Security John Demers in a statement.

A retired U.S. army officer with a background in signals intelligence, Hansen worked for the Defense Intelligence Agency until 2006. He also performed contract work for the U.S. government until late 2011.

Federal prosecutors said that, starting in 2012, Hansen attempted to gain national security information by seeking employment from the U.S. intelligence community and gaining trust of officials in the field. He regularly attended defense and cyber conferences in Washington, D.C. But unbeknownst to Hansen, he was being monitored by federal agents. Since 2013, Hansen received at least $800,000 in funds originating from China, according to the Justice Department.

When federal officials searched Hansen’s computer in 2016, they found a swath of documents that included “information detailing U.S. Cyber Command locations, personnel, and organizational structure.” Another search uncovered documents containing current and past locations of D.I.A. facilities in San Antonio, Texas, and “cryptic notes” related to a classified program from the agency.

Hansen told a law enforcement source he had ongoing contact with the Chinese government, including “in-person meetings with intelligence officers.”

The federal complaint tells a story of Hansen’s financial trouble. It said the former U.S. army official had only “intermittent periods of verifiable income,” and was in debt up to $200,000.