The Chinese government, still coming to terms with a stunning electoral victory for the pro-democracy movement in Hong Kong, is directing its ire at a popular foe: the United States.

The Chinese Ministry of Foreign Affairs summoned the American ambassador to Beijing on Monday, a day after the local elections in Hong Kong that were seen as a rebuke to the authoritarian policies of president Xi Jinping.

Chinese officials warned the ambassador, Terry Branstad, that the United States should “stop interfering in China’s internal affairs,” according to the ministry. They also criticized Congress for passing a bill recently to support the protesters.

The state-run news media Tuesday revived a popular line of attack against the United States, accusing American politicians of harboring “sinister intentions” and encouraging unrest in Hong Kong as a way of containing China’s rise. By directing their anger at the United States, Chinese officials are reviving a theme that will likely be popular with the masses and allow the government to avoid taking responsibility for the defeat, analysts said.

“Beijing knows very well that they lost the game in the election,” said Willy Lam, a political analyst who teaches at the Chinese University of Hong Kong. “Beijing had to blame somebody, so in this case it is blaming outside foreign forces, particularly in the United States, for interfering in the elections.”

The flash of anger from Beijing reflected the central government’s deep anxieties about months of unrest in Hong Kong, one of the most sustained challenges to Communist Party rule in decades. The victory for the pro-democracy candidates appeared to take Beijing by surprise.

Pro-democracy candidates captured 389 of 452 elected seats, far more than they had ever won. Beijing’s allies held just 58 seats, down from 300. The elections Sunday were for district councils, some of the least powerful positions in Hong Kong’s government.

But the vote was seen as a barometer of public attitudes toward Beijing and a referendum on the protests, which began in June over an unpopular extradition bill and have since turned into a call for greater freedom in the semiautonomous territory.

A molotov cocktail with a battery attached to it is seen next to bricks and a makeshift catapult (L) on a rooftop at the Hong Kong Polytechnic University on Tuesday. Photograph: Getty

Carrie Lam, Hong Kong’s embattled leader, on Tuesday disputed the idea that the bruising defeat of pro-Beijing candidates had broader implications. But she acknowledged that there appeared to be dissatisfaction with how the government handled the extradition bill.

“There are people who want to express the view that they could no longer tolerate this chaotic situation,” Ms Lam said at a regular news briefing. “There are of course people who felt that our government has not handled competently the legislative exercise and its aftermath.”

At the meeting with Ambassador Branstad on Monday, Zheng Zeguang, a vice foreign minister, criticized the passage of the bill, known as the Hong Kong Human Rights and Democracy Act.

“Any attempt to destabilize Hong Kong and undermine its stability and prosperity will never succeed,” Zheng said, according to the ministry The House and Senate both passed the bill, which could impose sanctions on Chinese officials for cracking down on the protesters, with a veto-proof majority this month.

The White House, which is engaged in delicate trade negotiations with China, has not said whether US president Donald Trump will sign it.

At their meeting Monday, Branstad told Zheng that the United States was watching the situation in Hong Kong with “grave concern,” according to a spokesman for the American embassy in Beijing.

Mr Branstad added that “the United States believes that societies are best served when diverse political views can be represented in genuinely free and fair elections,” according to the embassy. - The New York Times