A Chinese academic who penned an essay blaming the coronavirus pandemic on President Xi Jinping's authoritarianism and censorship has been released after nearly a week in detention, his friends have told AFP.

Xu Zhangrun, a law professor at Beijing's prestigious Tsinghua University, was taken from his home in the capital by a group of more than 20 people on July 6, according to associates.

He returned home on Sunday and was well, two friends confirmed to AFP on Sunday, speaking on condition of anonymity.

In an essay published on overseas websites, Xu had written that the leadership system under Xi -- China's most powerful leader since Mao Zedong -- was "destroying the structure of governance".

He said the lack of openness contributed to the outbreak of the coronavirus, which first appeared in China late last year and eventually spread globally after Communist Party officials tried to suppress initial news of the contagion.

It was not immediately clear whether he would face further repercussions.

Beijing police did not immediately respond to a request for comment on Monday.

A friend of Xu's told AFP on July 6 that a man claiming to be police called the professor's wife to say he had been arrested for allegedly soliciting prostitutes, which the friend dismissed as "ridiculous and shameless".

The professor -- a rare government critic in the heavily censored world of Chinese academia -- had been put under house arrest a week prior to being taken into custody, the friend had said.

Xu Zhangrun was deeply critical of China's President Xi Jinping (centre)
Xu Zhangrun was deeply critical of China's President Xi Jinping (centre) AFP / NICOLAS ASFOURI

In a previous essay circulated online, Xu spoke out against the 2018 abolition of presidential term limits, which left Xi free to rule for life.

After Tsinghua reportedly barred Xu from teaching and research in 2019, hundreds of Tsinghua alumni -- and academics around the world -- signed an online petition calling for his reinstatement.

The US and the EU last week called Xu's detention a human rights violation, pressing for his release.

"It's good news that Professor Xu has been released, but he should have not been detained in the first place," said Yaqiu Wang, China researcher at Human Rights Watch.

Wang called the prostitution accusation "laughable", saying it was a common government tactic used to smear and silence critics.

Xu is just the latest in a wave of intellectuals swept up in what critics say is a crackdown by Xi on dissent in all spheres of public life.

Legal scholar Zhang Xuezhong was briefly detained by Shanghai police in May after publishing an open letter criticising Beijing's handling of the coronavirus and calling for a democratic government.