Image copyright Reuters Image caption A smiling Liu Xia is seen arriving in Helsinki en route to Berlin

The widow of Nobel Peace Prize winner Liu Xiaobo has left China for Germany after eight years in unofficial detention.

Liu Xia, 57, left Beijing early on Tuesday and flew to Berlin.

She had been under effective house arrest in the Chinese capital since her husband won the prize in 2010.

Liu Xiaobo, a university professor turned human rights campaigner, was jailed in 2009 for inciting subversion. He died of liver cancer last year.

Liu Xia, a poet, is said to have suffered from depression after spending years under heavy surveillance.

She has never been charged with any crime but said in May she was ready to die in protest at her continued detention.

A Foreign Ministry spokeswoman confirmed her departure - "for medical treatment, in accordance with her own will" - but said it had nothing to do with this week's visit to Germany by China's Premier Li Keqiang.

Photos later showed her smiling on arrival in Helsinki en route to the German capital.

Sustained diplomacy led to release

Stephen McDonell, BBC News, Beijing

Even under effective house arrest and in declining health, Liu Xia was a threat to the Chinese Communist Party. As the widow of a Nobel Peace Prize winner who'd died in Chinese custody, the authorities here feared that the poet would speak out.

Image copyright Handout/AFP Image caption Liu Xia (right) with Liu Xiaobo in 2002

She had never been charged with a crime and yet had guards permanently posted right outside her door and also at the gates to her housing compound. They were there to stop her from leaving and to prevent journalists, diplomats and supporters from visiting.

The Chinese government had always maintained that she was as free as any citizen here but - after eight years being denied permission to leave her house as she pleased - her physical and mental wellbeing were deteriorating.

The fear was that she, like Liu Xiaobo, might die in captivity.

Finally, in the days approaching the first anniversary of her husband's death, a sustained diplomatic effort, led mainly by Germany, has worked and she has realised her dream to get out.

How did she leave?

She took a Finnair flight from Beijing to Berlin at 11:00 local time (03:00 GMT) on Tuesday, a friend, Ye Du, told news agencies.

While there was no immediate comment from its embassy, Germany had been urging China to allow Mrs Liu to leave.

Media playback is unsupported on your device Media caption Liu Xiaobo: China's most influential dissident

Western diplomats reportedly tried to visit Mrs Liu at her Beijing flat in May but were refused entry.

News of her departure comes three days before the anniversary of her husband's death.

How desperate had her situation become?

In May, she told her friend Liao Yiwu by phone that it was "easier to die than live".

"I've got nothing to be afraid of," she was quoted as saying. "If I can't leave, I'll die in my home. Xiaobo is gone, and there's nothing in the world for me now."

Image copyright AFP Image caption Liu Xia with a picture of her husband last year

Mr Liao also uploaded a recording of a phone conversation he had had in April with Mrs Liu, where she can be heard crying and saying: "I'm ready to die here."

Chinese authorities had maintained the dissident's widow was a free citizen but she had faced restrictions on her movements and had been kept under surveillance.

Patrick Poon, China Researcher at the human rights groups Amnesty International, said it was "wonderful news that Liu Xia is finally free and that her persecution and illegal detention at the hands of the Chinese authorities has come to an end".

He added: "The Chinese authorities tried to silence her, but she stood tall for human rights."

Amnesty further called for an end to the harassment of Liu Xia's family who remained in China.

"It would be most callous of the Chinese authorities to use Liu Xia's relatives to put pressure on Liu Xia to prevent her from speaking out in future," its researcher added.