A Chinese national who managed to get a job working as a U.S. Customs and Border Protection supervisor in Calais has been arrested and charged in what FBI agents claim was a plot to install modified hardware in Department of Homeland Security computers.

Terry “Jiajia” Liu — originally of Guangzhou, per his Facebook page — was arrested after a counter intelligence investigation captured hidden-camera footage of him breaking into government computers and modifying the hard drives.

According to court records released Friday in Maine District Court, Liu is alleged to have stripped valuable components from government computers, replaced them with inferior parts and traded the originals to an electronics retailer for credit.

Liu, 39, is charged with theft and damage of government property in a case involving 46 altered computers at three Maine border facilities. Prosecutors are seeking to keep him jailed, citing frequent international travel, financial resources and a home close enough to Canada that an ankle monitor might not prevent him from leaving the country.

The alleged scheme persisted after a port director explicitly warned Liu not to move computers or their parts. Investigators later installed cameras that, according to an FBI affidavit, captured the supervisor opening government computers and swapping components during overnight shifts.

The affidavit doesn’t state or imply that the alternative hardware the Chinese national installed on Homeland Security computers might have served an espionage purpose.

The government estimates that restoring the altered parts would cost $20,460. Replacing all 46 computers would cost an estimated $105,800, before additional expenses to configure them for government use.

Liu appeared Thursday before U.S. Magistrate Judge John C. Nivison in Bangor, where he was ordered temporarily held without bail pending a detention hearing scheduled for Friday morning. He waived a preliminary hearing but requested a hearing on the government’s detention motion.

According to FBI Special Agent Christopher J. White’s affidavit, Liu was a CBP supervisor assigned to the Calais Port of Entry, with responsibilities extending to Ferry Point and Milltown. His job included limited information-technology duties, but he was not authorized to modify computers.

On March 18, 2025, Port Director Theodore Cummings put that restriction in writing after speaking with Liu.

“Please do not move any computers or computer parts,” Cummings wrote.

The email distinguished equipment maintained by a contractor from CBP computers, which were to be serviced by the agency’s information-technology personnel.

“I do appreciate the intent but we should stay in our lane and report deficiencies through the work ticket process,” Cummings wrote.

Months later, CBP personnel discovered that approximately 23 computers had been modified without authorization. Original processors, memory and hard drives had been replaced with components that did not meet agency requirements. Many of the machines had been reconnected to the CBP network.

A subsequent inventory expanded the total to 46 computers: 38 at Calais, six at Ferry Point and two at Milltown.

Thirty-nine had undergone processor replacements, six had memory changes and eight had hard-drive changes, according to the affidavit. Some machines had more than one type of modification.

The government computers were equipped with 14th-generation Intel processors. Investigators found that many had been fitted instead with older processors or Intel Pentium models. Other machines had less memory or storage than their original configurations.

Investigators also found a potential route for the missing parts: Newegg’s trade-in program.

The affidavit describes 13 emails Liu sent from a personal account to his official CBP email address containing shipping labels and trade-in summaries for processors matching the model missing from government computers. The offers were for $200 or $210 apiece.

Records obtained from Newegg showed that Liu received credit for trading in 14th-generation Intel Core i7 processors 16 times between May 2025 and July 2026, according to the FBI. Investigators also identified three $200 Newegg credits in his American Express records.

The criminal complaint charges Liu with stealing 10 Intel processors worth more than $1,000 between approximately May 2025 and January 2026. A second count alleges that he damaged or attempted to damage CBP computers between January and March 2026, causing more than $1,000 in damage or attempted damage.

Investigators’ account includes a detailed reconstruction of Liu’s movements during a January 9 overnight shift.

Shortly after midnight, he allegedly carried computers into a training room, removed their side panels and began working on the components. A camera installed days earlier recorded him using what appeared to be a screwdriver, removing a processor and scraping its surface in a manner consistent with removing thermal paste, White wrote.

Liu then allegedly installed a replacement processor, moved components between machines and connected monitors, keyboards and network cables to test the computers.

At one point, investigators said, he appeared to use his government identification to log into a modified computer.

Another camera, installed above Liu’s assigned desk in March, allegedly recorded him removing a memory module from a computer and placing it in his desk drawer. He then carried the computer into a server room and connected it to a monitor, keyboard, mouse and network cable.

The affidavit describes working conditions that could leave Liu separated from other officers. During midnight shifts, one supervisor typically covered the open ports in the area. Traffic at the Calais facility was directed to the cargo side, while Liu’s assigned desk was on the passenger side.

According to White, Liu admitted during a September 9 interview that he replaced CBP components with older parts purchased from Amazon and Newegg and used government parts to obtain trade-in credit.

His explanation changed during the interview, the agent wrote.

Liu initially said he made the modifications to improve the computers’ efficiency. Under further questioning, according to the affidavit, he acknowledged knowing that the changes degraded performance and said he acted because he was angry about how long CBP computer repairs took.

In seeking detention, Assistant U.S. Attorney Chris Ruge argued that Liu had engaged in “recent and frequent international travel” and had “apparent foreign connections and substantial means with which to flee.”

Ruge also argued that the allegations against Liu could weaken his ties to his government employer and the United States.

His residence near the Canadian border offered “significant opportunity” to leave the court’s jurisdiction even under location monitoring, the prosecutor wrote.

Liu’s immigration status is unclear. Though he has described himself as a native of Guangzhou, China, he has also posted images to Facebook suggesting that he voted in the 2020 election.

Although investigators say modified computers were reconnected to the agency’s network, the affidavit does not allege that Liu installed malware or transmitted government information to anyone outside the agency.

Newegg is an online retailer, founded by Taiwanese billionaire Fred Chang, specializing in computer components, electronics and gaming equipment. Its trade-in program lets customers exchange eligible used processors, memory and graphics cards for credit toward new purchases.

According to a Washington County source, Liu’s Poole Street property in Calais was raided by what locals believed to be FBI agents on Thursday.

Liu purchased that property in 2018, according to property records.

Before that he lived in Oklahoma, where his Facebook account indicates he attended college and worked in a government job.

Corporate records and licensing records show Liu briefly owned a cannabis license tied to Jliu Farm LLC based in Webbers Falls, Okla.

The source said Liu was apprehended at Bangor International Airport (BIA) trying to catch a flight back to China, though the court records do not confirm the nature of his apprehension.