The Hong Kong demonstrations have evolved into a movement for deeper democratic reforms. (File)

A senior official in the administration of US President Donald Trump on Monday urged "all sides" to avoid violence in Hong Kong, while calling for political tolerance.

"Societies are best served when diverse political views are respected and can be freely and peacefully expressed. The United States urges all sides to refrain from violence," the official said on condition of anonymity.

Trump has so far been muted on the growing unrest in Hong Kong, saying it is an internal affair for China, while acknowledging that the protesters "are looking for democracy."

The semi-autonomous southern Chinese city has endured weeks of protests triggered by a government bid to introduce a law that would have allowed extraditions to mainland China.

The demonstrations evolved into a movement for deeper democratic reforms and an end to eroding freedoms, in the most significant challenge to Beijing's rule since the city's handover from Britain in 1997.

With the US engaged in a growing trade war with China, Trump has been notably reluctant to get involved in the drama.

"That's between Hong Kong and... China," Trump told reporters at the White House on August 1. "They don't need advice."

However, a month earlier, he angered Beijing by saying that "most people want democracy. Unfortunately, some governments don't want democracy."

"That's what it's all about. It's all about democracy," he said.