A member of New York’s Chinese dissident community on Tuesday pleaded guilty to spying on his fellow activists on behalf of the Chinese government.

Tang Yuanjun (唐元雋), 68, had long been an outspoken critic of the Chinese Communist Party, joining monthly protests outside the country’s Manhattan consulate and founding a pro-democracy nonprofit in Flushing, Queens, where he has lived since 2002.

However, as he publicly advocated against his homeland’s government, Tang was quietly acting on orders from Beijing’s intelligence service to collect information on his fellow Chinese-American rights advocates, according to a guilty plea entered on Tuesday.