HONG KONG—Before leaving Hong Kong two years ago for a fellowship in the U.S., Rowena He shredded the work of her students and wiped the hard drive on her computer.

The prominent scholar of China’s bloody 1989 crackdown on democracy protests in Tiananmen Square said she feared she could be arrested and forced to turn over their work.

“It’s so brutal and cruel to have to burn your students’ papers, to erase everything in my computer,” He said in a recent interview. “My job is to document history, but personally, I have nothing to hold on to.”

A year later, as she was preparing to return to Hong Kong, immigration officials denied her visa and the Chinese University of Hong Kong fired her from her teaching position, said He, who is a Canadian citizen.

The historian’s story reflects the narrowing space for academic freedom in this former British colony, once a freewheeling bastion of scholarly debate.

Hong Kong has been promoting what it calls patriotic education since antigovernment protests in 2019 led to Beijing imposing a national-security law that criminalized most political dissent . At the city’s universities, funding for projects tied to foreign donors has been scrapped, while dissertations and creative works have been edited, sometimes rewritten, to avoid potentially sensitive words and topics, according to academics.

Many teachers are leaving the city, or being forced out. Education authorities recently reported a jump in turnover among university scholars, with 7.6% leaving their positions during the past academic year—the highest rate since the U.K. handed control of the city back to Beijing in 1997.

“Beijing has sent a giant boa constrictor to crush the vibrant, diverse city of Hong Kong,” said Perry Link, emeritus professor of East Asian Studies at Princeton University.

“Rowena He is but a small part of this big picture, yet she is an especially poignant part because of her steadfast cry of ‘No!’ against the famous massacre in Beijing in 1989,” said Link.

Outside classrooms, memories of the Tiananmen massacre are being erased. A 26-foot-tall monument to its victims, the Pillar of Shame, was taken down at the University of Hong Kong and later seized by police . Organizers of an annual candlelight vigil—the only such mass remembrance on Chinese soil for 30 years— have been jailed , and police have detained residents who tried to publicly mark the anniversary.

Asked about He, Hong Kong’s Immigration Department referred to a statement issued by the city’s government last year saying visa applicants should “raise no security or criminal concerns” and have no likelihood of being a burden on the city.

The Chinese University of Hong Kong said it can only employ people without permanent residency if they possess a valid visa, and that it is unable to influence visa outcomes.

The city’s government has said its patriotic education guidelines aim to enhance a sense of national identity among citizens and an appreciation of Chinese culture. The city said last month that universities have autonomy to design their curriculum and that academics in the city continue to have normal exchanges with scholars around the world.

He, who was born in China, studied political exile for 25 years and published a book on leaders of the Tiananmen movement. Now, she said, she is wrestling with the irony of becoming an exile herself—though she doesn’t consider herself an activist.

“I think I’m just following the Chinese tradition of Confucian dissent, meaning we try to help the country to improve,” she said. “I’m not trying to overthrow it.”

He took part in 1989 pro-democracy protests as a teenage student in Guangzhou, a southern Chinese city near Hong Kong, and wore a black armband to class after the military mowed down her peers in Beijing. She moved to Canada to pursue an interdisciplinary Ph.D. in 1998, then landed at Harvard University as a postdoctoral fellow, and later a lecturer.

She is known in her field for the passion she brings to her work, particularly on Tiananmen. “Rowena takes sides up front and you know what side she’s on,” said Link, the Princeton professor.

When she arrived at the Chinese University in 2019, the antigovernment protests had been swamping Hong Kong’s streets for weeks. Teaching Chinese history, especially to local and mainland students, became fraught in those circumstances. Chinese state media accused her of “poisoning the next generation.”

He said she also faced personal attacks from among her students. “You were just a lecturer in third-tier American universities; did you not come to Hong Kong and pass for an associate professor for money?” a student wrote using lewd language, according to a copy of the email He shared with The Wall Street Journal. The student also questioned her willingness to accept criticism.

In interviews, many of He’s students praised her teaching. They said she was adept at using letters, diaries, documentaries and newspaper clips to bring historical characters to life. Several described her as a motherly figure who personally led tutorials usually left to teaching assistants and whose classes often ran past their allotted time.

The historian recalled students gathering until 2 a.m. or 3 a.m. at her home, where they snacked, read books and discussed topics like nationalism, anti-intellectualism and U.S. politics.

A few changed their views after taking He’s classes. Wong Dan, a student from mainland China, said she was particularly struck by He’s lectures on people like Lin Zhao , a dissident who penned writings in her own blood while in detention and was executed for criticizing Mao Zedong .

“First, I was still a little suspicious. I felt like I knew nothing about the historical materials she presented us,” said Wong, who later began exploring the Chinese University’s renowned archive of original sources from the Mao period. “This was a starting point, at least for me, to challenge the dominant historical narrative that I learned from my previous background.”

The unraveling of He’s time in Hong Kong began in the summer of 2022, when she applied for a visa that would allow her to return to the city after a yearlong fellowship in the U.S. Immigration officials asked about her ties to American institutions, including the Institute for Advanced Study in Princeton, N.J., where she had researched the rise of nationalism among Chinese students.

Officials sent her a document requesting descriptions of every project she had done with the IAS and their sources of funding, according to a copy of the document seen by the Journal. They also asked whether she had links with the Canadian or U.S. governments, or any political or nongovernment organizations.

Months before her visa denial, a commentary in the pro-Beijing newspaper Wen Wei Po called on the Chinese University of Hong Kong—a leafy campus that turned into a fierce battleground between protesters and police in 2019—to eliminate what it called disruptive forces. The commentary singled out He, noting that the National Endowment for the Humanities, a U.S. government agency, was a donor to the fellowship she had accepted.

The commentary accused her of serving as a Western agent working under the guise of academic freedom to smear Hong Kong and China.

He said the attack was groundless and full of factual errors.

Richard Wong, a former student at the university who worked with He on his graduation thesis, said she opposed violence during the protests and taught students to reflect on their actions and attitudes, particularly when sentiment among some protesters turned against people from mainland China.

The Tiananmen historian is now in the middle of a two-year position as a research fellow at the University of Texas. She said several months passed before she could bring herself to unpack the boxes holding items from her office in Hong Kong.

He said she devoted herself to teaching modern Chinese history as a way to revive voices of resistance that have been silenced in the country. She said she hopes the residents of Hong Kong won’t give up hope.

“Memory was and has been the power of the powerless, and not just for me,” she said.