SHANGHAI (Reuters) - China’s foreign ministry summoned U.S. Ambassador Terry Branstad on Monday to protest against the passing in the U.S. Congress of the Hong Kong Human Rights and Democracy Act, saying it amounted to interference in an internal Chinese matter.

Newly appointed U.S. Ambassador to China Terry Branstad speaks to the media in front of his residence in Beijing, China June 28, 2017. REUTERS/Thomas Peter

The ministry said in a notice posted on its website Vice Foreign Minister Zheng Zeguang pressed the United States “to correct its errors and stop meddling in Hong Kong affairs and interfering in China’s internal matters”.

Anti-government demonstrators have protested in the streets of Hong Kong for six months amid increasing violence and fears that China will ratchet up its response to stop the civil disobedience.

The protesters are angry at what they see as Chinese meddling in the freedoms promised to Hong Kong when Britain handed it back to China in 1997.

The U.S. House of Representatives sent two Hong Kong-related bills to the White House on Wednesday after voting almost unanimously in favor of them. The Senate had unanimously passed the day before.

U.S. President Donald Trump is expected to sign the bills into law, despite delicate trade talks with Beijing.

Zheng said the passage of the Human Rights and Democracy Act was a form of encouragement of the violence and constituted a serious violation of international law and basic norms of international relations.

“China expresses its strong resentment and resolute opposition,” he was quoted as saying.

A U.S. embassy spokesman said Branstad told Zheng the United States was watching events in Hong Kong “with grave concern”.

“‎He conveyed that we condemn all forms of violence and intimidation. The ambassador added that the United States believes that societies are best served when diverse political views can be represented in genuinely free and fair elections.”

A U.S. State Department spokeswoman said earlier Hong Kong’s autonomy, its adherence to the rule of law and its commitment to protecting civil liberties were “key to preserving its special status under U.S. law”.

“As the United States Government has said repeatedly, the Chinese Communist Party must honor its promises to the Hong Kong people, who only want the freedoms and liberties that they have been promised in the Sino-British Joint Declaration, a U.N.-filed treaty,” the spokeswoman said.

The Joint Declaration is the 1984 agreement of the terms under which Britain would return Hong Kong to China on July 1, 1997, and included the promise of a “high degree of autonomy” for Hong Kong for 50 years from that date.