Washington DC: United States national security adviser Robert O'Brien said that an initial trade agreement with China is still possible by the end of the year, but warned Washington would not turn a blind eye to what happens in Hong Kong.

The comments add to growing worries that a Chinese crackdown on anti-government protests in Hong Kong could further complicate the efforts by the United States and China to end a prolonged trade war that has roiled global markets and undercut global economic growth forecasts.

"We were hoping to have [a phase one] deal done by the end of the year. I still think that's possible," O'Brien told reporters at a security conference in Halifax.

"At the same time, we're not going to turn a blind eye to what's happening in Hong Kong or what's happening in the South China Sea, or other areas of the world where we're concerned about China's activity," he said.

He said that he hoped district elections in Hong Kong on Sunday would proceed without violence. "That would be a good sign," he said.

Meanwhile, the Chinese government's top diplomat said the US is the world's biggest source of instability and its politicians are going around the world baselessly smearing China.

"The United States is broadly engaged in unilateralism and protectionism, and is damaging multilateralism and the multilateral trading system. It has already become the world's biggest destabilising factor," China's Foreign Ministry cited State Councillor Wang Yi as saying.

The US has, for political purposes, used the machine of state to suppress legitimate Chinese businesses and has groundlessly laid charges against them, which is an act of bullying, he added, speaking on the sidelines of a G20 foreign ministers meeting in the Japanese city of Nagoya.

US President Donald Trump on Friday said he had told Chinese President Xi Jinping that crushing the Hong Kong protesters would have "a tremendous negative impact" on efforts to reach an accord to end a 16-month trade war.

He has been vague about whether he would sign or veto US legislation to back protesters in Hong Kong, and boasted that he alone had prevented Beijing from crushing the demonstrations with a million soldiers.

O'Brien said he had not spoken to Trump on Saturday about his decision on whether to sign the Hong Kong human rights bill and did not know what he would do, but noted that the president had until early December to decide. The legislation will automatically become law on December 3, if Trump opts to do nothing.

"I think the bill passed with a pretty significant majority, so I'm sure that's something the president is taking into consideration," O'Brien said.