BEIJING — First, the police took away the think tank’s former graphic designer, then the young man who organized seminars, and eventually its founder. Another employee fled China’s capital, fearing he would be forced to testify against his colleagues in rigged trials.

“The anxiety is overwhelming, not knowing if they are coming for you,” said the employee, Yang Zili, a researcher at the Transition Institute of Social and Economic Research in Beijing, who has been in hiding since November. “It’s frightening because as they disappear, one friend after another, the police are not following any law. They just do as they please.”

These are perilous days for independent civic groups in China, especially those that take on politically contentious causes like workers’ rights, legal advocacy and discrimination against people with AIDS. Such groups have long struggled to survive inside China’s ill-defined, shifting margins of official tolerance, but they have served as havens for socially committed citizens.

Under President Xi Jinping, however, the Communist Party has forcefully narrowed the bounds of accepted activity, setting off fears that these pockets of greater openness in China’s generally restrictive political landscape may soon disappear.