China’s dismissive critique of the U.K. treaty governing the return of Hong Kong raised new doubts about its commitment to the city’s autonomy and other international agreements.

On the eve of the handover’s 20th anniversary, the Chinese Foreign Ministry declared the Sino-British Joint Declaration a “historical document” that “no longer has any practical significance.” The ministry’s remarks came Friday in response to U.K. Foreign Secretary Boris Johnson’s pledge to defend the rights and freedoms guaranteed Hong Kong until 2047 under the treaty.

“It is not at all binding for the central government’s management over Hong Kong,” ministry spokesman Lu Kang said. “The U.K. has no sovereignty, no power to rule and no power to supervise Hong Kong after the handover.”

Beijing’s control was a theme stressed repeatedly this week during Chinese President Xi Jinping’s three-day visit to commemorate Hong Kong’s 1997 return. But the critique of the 33-year-old Joint Declaration — one of China’s most prominent agreements since opening up to the world — resonated as nations struggle to assess the rising power’s impact on established global norms.

“This is one of those occasions when the rest of the world should pay attention and respond — this is much bigger than Hong Kong,” said Steve Tsang, director of the SOAS China Institute in London and author of “A Modern History of Hong Kong.” If Beijing can “relegate an international agreement with the U.K. to the dustbin of history when it no longer suits China, can any other government which has signed an international agreement have confidence?” he said.

The episode recalled a former top Chinese diplomat’s dismissal of an international tribunal’s ruling on the South China Sea last year as no more than “waste paper.” China continues to draw international criticism for disregarding the July 2016 decision, which was brought by the Philippines and found the country’s claims to more than 80 percent of the key shipping lane have no basis in law.

In recent months, Xi has also come to the defense of international agreements, vowing to uphold the Paris climate change accord after President Donald Trump announced the U.S.’s withdrawal. China has sought a larger role in multinational bodies such as the United Nations and the World Trade Organization.

The Joint Declaration, which was signed by then-premiers Margaret Thatcher and Zhao Ziyang after two years of intense negotiations, provided a road map for maintaining the autonomy of Hong Kong’s political and legal structure from 1997 until at least 2047. The treaty was lodged with the U.N. and guided the drafting of Hong Kong’s Basic Law.

The handover was viewed by many in China as a historic milestone after more than a century in which its territory was carved up in a series of “unequal treaties” with the U.K. and other colonial powers. In a speech to commemorate the city’s return Saturday, Xi lamented the period of “humiliation and sorrow” when “China was repeatedly defeated by countries which were far smaller in size and population.”

Now boasting the world’s second-largest economy and one of its most powerful militaries, China has shown less patience for meddling in Hong Kong’s internal affairs. Zou Pingxue, director of Shenzhen University’s Hong Kong and Macau Basic Law Research Center, said the foreign ministry’s comment appeared to be a targeted effort to push back.

“I don’t see it as a categorical rejection of the Joint Declaration, or being disrespectful about it,” Zou said. “It’s a message sent out to U.K. politicians and lawmakers that the Joint Declaration cannot be used as a talking point all the time to justify what they’d like to think, that Britain still has a legal obligation over Hong Kong.”

At the same time, the U.K. has been accused by Hong Kong democracy advocates of failing to defend the treaty to avoid angering the world’s largest trading nation. The city’s last colonial governor, Chris Patten, said Thursday that, “the international community — and Britain in particular — hasn’t made the sort of fuss it should have done” to protect Hong Kong’s freedoms.

The same day, Johnson issued a statement saying that “Hong Kong’s future success will depend on the rights and freedoms protected by that treaty.” “Britain’s commitment to Hong Kong — enshrined in the Joint Declaration with China — is just as strong today as it was 20 years ago,” he said. The Foreign Office issued another statement Friday, asserting that the Joint Declaration remains in force and is “a legally binding treaty.”

“Britain and the rest of the world should not allow China go walk away from these obligations at will,” said Anson Chan, a former pro-democracy lawmaker who served as Hong Kong’s No. 2 official under both the U.K. and Chinese.

China has previously sought to play down the treaty’s scope, saying on the 30th anniversary of the document’s signing that “after 1997, Hong Kong affairs are the Chinese people’s own business.”

“Beijing is either disavowing its treaty obligations or declaring its intention to breach the treaty,” Michael Davis, a former professor of constitutional law at Hong Kong University, said Saturday. “Either way, this will not bode well for those who claim China is a reliable partner who meets its international obligations.”