A Boston man appeared in federal court Thursday, pleading not guilty to charges related to helping the Chinese government spy on local community advocates and organizations it opposes.

Li Tan Liang of Brighton is charged with conspiracy to act as an agent of a foreign government and acting as an agent of a foreign government without notice to the attorney general.

After entering his plea of not guilty, Liang was set to be released on $25,000 secure bond, to be paid in cash, on the condition that his travel is restricted to Massachusetts. He will be monitored by GPS.

Federal prosecutors allege Liang has been acting as an agent of the Chinese government since 2018, handing over lists of names, organizations and even sending photographs of people at events and rallies in the Boston area.

A Boston man has been arrested for allegations that he helped the Chinese government spy on local people associated with promoting democracy in China.

“It’s definitely nerve-wracking to just learn all about what he has done in the past years, and especially to the people that participated in the rally that I organized in August of 2019,” said Frances Hui, policy and advocacy coordinator for the Committee for Freedom in Hong Kong Foundation.

Hui organized the 2019 “Boston Stands With Hong Kong” march.

In the indictment, prosecutors allege Liang, 63, was there as a counter-protester to the pro-democracy movement.

“I saw all of these threats coming through the WeChat groups that we were overseeing,” Hui told NBC10 Boston on Tuesday. “There were gun threats and people threatening to bring guns — like firearms — to the rallies, and to shoot me, even.”

Hui, who now lives in Maryland, is calling for people to pay attention to the situation.

“It’s an organized spy activity on dissidents from Hong Kong,” she said. “I think that we just have to wake up to this and realize that this is the trans-national repression that we are facing under China’s extensive rule.”

In the indictment, Liang is accused of taking part in several other incidents.

On Sept. 2, 2019, Liang allegedly photographed dissidents against the People’s Republic of China in front of the Boston Public Library. He’s accused of sending photographs to a Chinese government official, calling the protesters a “bunch of clowns trying to cause trouble.”

He is also accused of providing names of potential recruits. The indictment shows a photograph of Liang with three people whose names and faces are not revealed, but who are identified as a Chinese government official and two candidates Liang allegedly put forth be cultivated and trained by the Ministry of Public Security.

“Although the Ministry of Public Security (MPS) is a PRC domestic law enforcement agency responsible for public safety and law enforcement, it also serves functions associated with intelligence services and national security,” the indictment reads. “It is tasked with investigating political dissidents.”

The indictment also notes that the photo, zoomed in, shows Liang holding a plaque reading “Police.”

U.S. District Court for the District of Massachusetts

At Liang’s house in Brighton Tuesday, someone saw NBC10 Boston at the door and closed it before answering any questions.