A woman attends a vigil for terminally ill Nobel laureate Liu Xiaobo

Germany on Monday urged China to allow terminally ill Nobel laureate Liu Xiaobo to quickly get the medical help he needs, after friends of the Chinese activist said he wanted to be treated abroad.

Liu, who was sentenced to 11 years in prison in 2009 for "subversion" after calling for democratic reforms, was released on medical parole after being diagnosed with terminal liver cancer last month, his lawyer has said.

One of his family friends told AFP that he had sent a letter from Liu's wife to the US and German governments expressing the couple's wish to leave China.

On the eve of a state visit to Berlin by Chinese President Xi Jinping, German government spokesman Steffen Seibert did not confirm reception of the letter.

But he said the German government "hopes that (Liu) will get all the medical support he needs".

"We have taken note of reports on requests for Mr Liu and his wife to travel abroad," Seibert added. 

"The government believes that in such a difficult situation, a humanitarian solution for Liu Xiaobo should be the highest priority."

Seibert said that he would not speculate about what issues Merkel would raise with Xi but that the chancellor had "in the past repeatedly spoken about individual human rights cases with the Chinese leadership".

China has long been criticised for its harsh treatment of activists and dissidents, and controls on civil society have tightened since Xi took power in 2012.

Campaigners say it is impossible to know the exact number of lawyers and activists in detention because many are held incommunicado with no access to their families or legal counsel.

Xi will travel to Germany on Tuesday evening, and he and Merkel are to unveil Wednesday a pair of pandas at the Berlin zoo and also attend a football match.

On Thursday, they will head to the northern city of Hamburg to attend a G20 summit meeting of leaders of industrialised and emerging powers.