German Chancellor Angela Merkel has said the rights and freedoms of people in Hong Kong "must be guaranteed" after meeting with Chinese Premier Li Keqiang in Beijing, her spokesman said.

Hong Kong has been plunged into months of pro-democracy protests, and ahead of her three-day visit to China this week protesters in the semi-autonomous city appealed to the German chancellor to support them in her meetings with China's leadership.

In a tweet, spokesman Steffen Seibert quoted Ms Merkel as saying: "The rights and freedoms of the people of Hong Kong must be guaranteed. Solutions can only be found in dialogue; do everything possible to prevent violence".

Chancellor Merkel arrived in China yesterday with a large business delegation in tow.

Press access to her visit was unusually tight, with a number of members of the Beijing foreign press corps unable to get accreditations for the event. Chinese officials cited a lack of space due to a large contingent of journalists accompanying Ms Merkel.

Prominent movement leader Joshua Wong and others recalled in an open letter published by top-selling Bild daily on Wednesday that Ms Merkel grew up in the communist police state of East Germany.

Read more:
Timeline of unrest in Hong Kong

"You have first-hand experience of the terrors of a dictatorial government," the letter read.

They also warned that "Germany should be on its guard before doing business with China, as China does not comply with international law and has repeatedly broken its promises".

Hong Kong has endured dozens of sometimes violent pro-democracy protests triggered by opposition to a now-withdrawn law that would have allowed extradition to mainland China.

A number of Chinese dissidents have been given refuge in Germany, including dissident-artist Ai Weiwei.

Hong Kong activist Joshua Wong (front) has warned Germany to "be on its guard" in China

In May two former Hong Kong independence activists were granted refugee status in Germany in what is one of the first cases of dissenters from the semi-autonomous Chinese city receiving such protection. 

On a visit to China last year, Ms Merkel met with the wife of a Chinese human rights lawyer charged with state subversion, in an extremely rare meeting between a dissident and a visiting head of state.

The trip marks her 12th visit to China as chancellor.

China's state news agency Xinhua has said in a commentary that Ms Merkel's visit came as "productive cooperation between the world's two major economies is much needed against the backdrop of global uncertainties".

Xinhua said China accounted for the largest share of imports into Germany in 2018 with goods worth €106.2bn.