Hong Kong pro-democracy protests
Police officers try to remove a protester from the entrance to Hong Kong's Chief Executive Leung Chun-ying offices next to the government headquarters building in Hong Kong.Reuters

China and the US got into a public spat over the pro-democracy protests in Hong Kong, as Beijing warned the protesters against "illegal acts".

Chinese Foreign Minister Wang Yi, speaking in Washington, said the Hong Kong situation is a matter of China's "internal affairs," and all foreign governments must respect "China's sovereignty," according to the BBC.

"The Chinese government has very firmly and clearly stated its position," Wang said at a meeting with US Secretary of State John Kerry to celebrate China's National Day, 1 October.

"For any country, for any society, no one will allow those illegal acts that violate public order."

He added that the Obama administration probably would handle such demonstrations the same way were they happening in the US.

Kerry had expressed support for universal suffrage in the city state, saying he had "high hopes" that the Chinese government would "exercise restraint and respect for the protestors' right to express their views peacefully".

Since this weekend, the pro-democracy activist movement Occupy Central has led thousands of demonstrators in Hong Kong to demand the freedom of a full democratic election in 2017.

Hong Kong was given back to China by the British in 1997 under the terms that it would have a certain degree of autonomy, but in August 2014 China said it still would let only approved candidates run in the 2017 elections.

Earlier this summer, Occupy Central held an unofficial referendum on "universal suffrage".

Nearly 800,000 people voted in the referendum and 42% were in favour of choosing their own leaders.

Tensions began to rise in late September when a group of students from the Chinese University of Hong Kong campus staged a weeklong boycott of classes.

The student demonstration was a precursor to Occupy Central's larger planned protest for China's National Day.

The Obama administration said it supports the protesters' democratic goals as long as they fit within the "One Country, Two Systems" principle that China promised to Hong Kong.

"We support universal suffrage in Hong Kong accordant with the Basic Law, and we believe an open society with the highest possible degree of autonomy and governed by rule of law is essential for Hong Kong's stability and prosperity," Kerry said.

While he and Kerry may have disagreed on Hong Kong, Wang said China was still committed to strengthening its relationship with the US.

"China and the United States need to work together to build a new model of major country relations featuring non-conflict, non-confrontation, mutual respect, and win-win cooperation," he said.

"This meets our common interests, meets the expectation of the international community."