President Donald Trump just made his most forceful comments yet in defense of Hong Kong, telling China that it must respect the city’s democracy and abide by the decades-old agreement giving it semi-autonomy.

Trump made the remarks during his address at the United Nations on Tuesday. Most of the speech was spent rehashing many of his talking points about the virtues of nationalism and the importance of national sovereignty. But the Hong Kong section was a particular surprise since he has for months failed to offer a full-throated defense of the city’s pro-democracy protesters.

Now he has — challenging Beijing in the process.

“The world fully expects that the Chinese government will honor its binding treaty made with the British and registered with the United Nations in which China commits to protect Hong Kong’s freedom, legal system, and democratic ways of life,” Trump told the room full of foreign dignitaries gathered at the UN headquarters in New York. “How China chooses to handle this situation will say a great deal about its role in the world in the future. We are all counting on President Xi as a great leader.”

The comments came during Trump’s long section on China, in which he accused the country of stealing America’s jobs and intellectual property and of stingily refusing to sign a long-sought trade deal with the US. It’s therefore no surprise Trump lumped in Hong Kong to further bash Beijing.

But while Trump has in the past said he hopes China deals with the demonstrations in the city “humanely,” he had yet to support the city’s democratic rights.

Which means his new comments could open up a further fissure between America and China — and make Trump an unlikely democratic hero in Hong Kong.

China wants to take Hong Kong’s democracy away

After taking over Hong Kong in a war in the 1800s, Britain returned it to China in 1997 with an important stipulation: The city would partly govern itself for 50 years before fully falling under Beijing’s control. So until 2047, the expectation was that the city and the mainland would operate under the principle known as “one country, two systems.”

But Beijing clearly isn’t waiting that long. “In recent years, the Hong Kong government has disqualified elected lawmakers, banned activists from running for office, prohibited a political party, jailed pro-democracy leaders, expelled a senior foreign journalist, and looked the other way when Beijing kidnapped its adversaries in Hong Kong,” Ben Bland, a Hong Kong expert at the Lowy Institute in Australia, told me in June.

The current fight began over proposed amendments to an extradition law that would allow a person arrested in Hong Kong to face trial elsewhere, including in mainland China. Demonstrators took to the streets over the summer because they believed the proposals would all but cement Beijing’s authority in a city that’s supposed to operate mostly on its own.

The popular resistance led Hong Kong’s Beijing-backed government to withdraw the amendments for now. But there’s still concern China may try to exert more influence over the city down the line — perhaps with a military intervention.

That’s why Trump’s comments are such a big deal and will surely resonate among Hong Kong’s protesters: The US president essentially just told China to back off. The question now will be whether Beijing chooses to heed Trump’s warning.