The party has long feared student-led protests, especially since the 1989 pro-democracy movement, which had deep student involvement and was crushed in a bloody crackdown around Tiananmen Square. Party leaders may be concerned that the 30th anniversary of the massacre, coming up in June, could inspire new protests.

“They don’t want to take any chances about students organizing politically,” said Eli Friedman, a labor scholar at Cornell who in October suspended an exchange program with Renmin University in Beijing because of the recent crackdown.

The protest on Friday came after Peking University officials tried to block a Marxist student group from organizing a celebration for Mao’s 125th birthday. On Wednesday, the president of the group, Qiu Zhanxuan, was taken in for questioning by security officials, students said, and he was later removed from his post. On Friday, students held signs demanding that the university reinstate Mr. Qiu and several other members.

The university did not respond to requests for comment on Friday.

The young communists began organizing in the summer, when dozens converged on the factories of southern China to stand with workers who were seeking to form a labor union without the Communist Party’s official backing.

Throughout their campaign, the activists have steadfastly voiced support for Mr. Xi and the tenets of communism. In celebrating Mao’s birthday this week, for example, they sang socialist anthems and chanted slogans like “Long live Chairman Mao! Long live the working class!”

While the students’ leftist critique of society has gained traction among a small number of students on university campuses, their numbers have dwindled in recent weeks as the government has intensified efforts to detain leaders of the campaign.

More than two dozen activists have been detained, gone missing or placed under house arrest over the past few months. In November, a recent graduate of Peking University who took part in the campaign, Zhang Shengye, was beaten and dragged into a car on campus and driven away, according to witnesses.