A German man has learned the hard way that practicing journalism in China, even for a class project, could lead to serious trouble.

David Missal, 24, was pursuing a master's degree in journalism and communication at prestigious Tsinghua University in Beijing. He left for Germany on Sunday, after immigration authorities told him his student visa was canceled and he had a week to leave China.

Missal said he thinks that's because he reported on the plight of jailed human rights lawyers in a journalism class. Missal said a Tsinghua representative this year warned him twice against pursuing the politically sensitive subject, but he went ahead anyway because he wanted to "get to learn Chinese society and politics."

"In a way, the last two months I did get to learn more Chinese society and politics," Missal said, referring to his own case.

China questioned, detained and in some cases formally arrested around 300 people nationwide starting from July 9, 2015, as part of its biggest crackdown on human rights lawyers and activists. Several received lengthy sentences for subversion of state power while a few still await sentencing.

The action against Missal underscores China's extreme sensitivity to foreign attention to the crackdown, word of which has rarely appeared in China's entirely state controlled media and on the heavily policed Chinese internet.

Missal said his work was never published beyond his personal blog and YouTube, which he thinks was seen by less than 100 people.

Tsinghua's propaganda office said it could not immediately comment and had to look into the case.