A Virginia resident entrusted with top secret information by the U.S. government has been charged with espionage after he travelled to China to pass classified information to Beijing's security services, according to the Justice Department.

Kevin Mallory, a 60-year-old Virginia resident, was arrested Thursday morning on charges he transmitted top secret and secret classified documents to an agent of China's security services, according to the DOJ.

Mallory allegedly travelled to Shanghai in March and April 2017, where me het with an individual he believed was representing China's Intelligence Service.

Justice Department attorney's described the actions as highly dangerous and said Mallory's indictment is meant to send a message to all U.S. officials who may be considering leaking classified information.

"The conduct alleged in this complaint is serious, and these charges should send a message to anyone who would consider violating the public's trust and compromising our national security by disclosing classified information," Dana Boente, acting assistant attorney general for national security and the U.S. attorney for the Eastern District of Virginia, said in a statement.

FBI officials disclosed that Mallory lied about his actions in interviews with federal investigators.

"Kevin Mallory was previously entrusted with Top Secret clearance and therefore had access to classified information, which he allegedly shared and planned to continue sharing with representatives of a foreign government," Andrew W. Vale, assistant director in charge of the FBI's Washington Field Office, said in a statement.

"Furthermore, he allegedly misled investigators in a voluntary interview about sharing of this classified information," Vale said. "The FBI will continue to investigate those individuals who put our national security at risk through unauthorized disclosures of information."

The Chinese spy Mallory allegedly worked with claimed that he was working for a Chinese-government sponsored think tank called the Shanghai Academy of Social Sciences. China is known for using think tanks as cover for its clandestine spy activities.

Mallory allegedly met with several Chinese spies, including a boss affiliated with the Chinese intelligence service, during several trips to Shanghai.

"After Mallory consented to a review of a device he had been using to communicate with [the Chinese spy], FBI viewed a message from Mallory to [one spy] in which Mallory stated that he had blacked out security classification markings on documents transmitted to [China]," according to the Department of Justice.

An analysis of the communications device showed information describing the contents of at least eight different classified U.S. documents, including those outlining the activity of an unnamed U.S. government agency.

"One of those documents was classified TOP SECRET, while the remaining two documents were classified SECRET," the DOJ said.

Mallory served as a consultant to GlobalEx, a government contractor and has held "numerous positions with various government agencies and several defense contractors," according to the DOJ.

"As required for his various government positions, Mallory obtained a Top Secret security clearance, which was active during various assignments during his career," the DOJ said. "Mallory's security clearance was terminated in October 2012 when he left government service."

Mallory is formally charged with "gathering or delivering defense information to aid a foreign government, and making material false statements," the DOJ said. He faces a maximum life sentence in prison.