NEW YORK (Reuters) - A former FBI employee in New York was sentenced to two years in prison on Friday after admitting that he illegally acted at the direction of a Chinese official to gather sensitive information.

Kun Shan Chun, an FBI employee who pleaded guilty in federal court to having acted as an agent of the Chinese government, is pictured in New York City, New York, U.S. August 1, 2016. REUTERS/Nate Raymond

Kun Shan Chun, also known as Joey Chun, was also ordered by U.S. District Judge Victor Marrero in Manhattan to pay $10,000 after pleading guilty in August to having illegally acted as an agent of a foreign government.

“I’m so sorry,” a tearful Chun said in court. “I take full responsibility.”

Chun, a U.S. citizen who was born in China, was arrested in March in connection with what prosecutors called a duplicitous betrayal of the FBI, which had employed him in its New York field office since 1997.

Prosecutors said that beginning in 2005, Chinese individuals claiming to be affiliated with a China-based printer products manufacturer called Zhuhai Kolion Technology Company Ltd solicited an investment from one of Chun’s parents.

Chun, 47, first met purported Kolion associates during a 2005 trip, and met them abroad at several other times, eventually meeting a Chinese official who asked him about the FBI and surveillance practices and targets, prosecutors said.

In turn, Chun provided the official an FBI organizational chart and photographs related to surveillance technologies, prosecutors said.

In exchange, Chun’s associates paid for him to go on international trips, and they sometimes also paid for prostitutes for him while he was abroad, prosecutors said.

By 2015, the FBI had sent an undercover agent to meet with Chun, who told the agent that “if you deal with the government, you know what they want.”

“They want what the American government is doing,” he said, according to prosecutors.

During a later meeting, in which they discussed selling classified information the agent provided, Chun said his Chinese associates had asked him about surveillance targets and if he had information on “who they watching,” prosecutors said.

The sale never happened, after Chun said he believed he was under investigation and one of his associates told the him not to trust the agent, who may be part of a “set up.”

In court on Friday, Chun’s lawyer, Jonathan Marvinny, argued his client deserved no prison time, saying he had acted only to protect his parents’ investment and was “not out to harm the United States.”

Marrero was unconvinced.

“Mr. Chun knew what he was doing, and he knew it was very wrong,” he said.