Shanghai (AFP) - A top Chinese university has removed references to "freedom of thought" from its charter, triggering a rare act of student defiance, while two other institutions added language stressing fealty to President Xi Jinping and the Communist Party.

A video circulating this week showed students at Shanghai's Fudan University singing the school song -- which extols "academic independence and freedom of thought" -- in an apparent protest.

Fudan's charter change was announced by the Ministry of Education on its website late Tuesday and criticism quickly trended on social media before China's ever-vigilant online censors acted to delete posts and block discussion.

Besides removing "freedom of thought", it adds "arming the minds of teachers and students with Xi Jinping's new era of socialist ideology with Chinese characteristics".

It also obliges faculty and students to adhere to "core socialist values" and build a "harmonious" campus environment -- a code phrase for the elimination of anti-government sentiment.

The ministry announced similar pro-government changes for Nanjing University in eastern China, and Shaanxi Normal University in the north earlier this month, although neither institution had referenced freedom of thought previously.

Xi took office in 2012 and has implemented a campaign to increase the Communist Party's grip and build a personality cult around himself that includes calls for adherence to a vaguely defined "Xi Jinping Thought", recalling the days of Communist founder Mao Zedong.

Xi's government has throttled activists and other critics while pushing Marxist dogma throughout Chinese society, from politics to culture and education.

But even Marxist students have faced a backlash, as police cracked down on some who supported a labour rights movement last year.

The risks of defying Xi have prevented major public pushback.

But Fudan, one of China's most selective institutions of higher learning, is also among its most liberal, with a student body proud of its reputation for relative academic freedom.

Story continues

In a brief clip, around two dozen people are seen singing the school song in a campus canteen on Wednesday as a security guard appears to be lightly admonishing them.

"I wish students had had the right or the time to express their opinions" on the charter change, one student who gave only his surname, Song, told AFP on Thursday.

Others said they do not expect much practical impact.

"I think people should be able to express themselves and I personally agree with freedom of thought," said a woman who plans to enrol in Fudan graduate studies.

"I will continue to stand my ground."

Beijing is currently grappling with Hong Kong anti-government protests in which university students have played a prominent role.

China's government already keeps a close eye on university campuses, which incubated some of the country's most momentous 20th-century political movements.

In 1989, thousands of university students took part in pro-democracy protests in Beijing's Tiananmen Square, provoking a bloody crackdown that remains a taboo subject.