Yet, there were disquieting signs from the start, as when Beijing replaced Hong Kong’s elected Legislative Council with an appointed one, prompting a protest by Britain and the United States. Since then, critical institutions that Britain nurtured, including a vigorous press, independent courts and a respected civil service, have been weakened as the Chinese Communist Party interfered in the city’s affairs.

The situation has worsened under President Xi Jinping, who has also intensified efforts to reduce international acceptance of Taiwan, which Beijing considers a renegade province that one day, like Hong Kong, must be brought under its control. Disputes between Hong Kong’s Beijing-backed leadership and the pro-democracy opposition have impeded the ability of the city’s government to make hard decisions and complete major construction projects. Affordable housing is scarce, the education system is troubled and a high-speed rail line is delayed.

In an attempt to silence critics, local booksellers and a politically connected billionaire were apparently abducted by mainland security officials, reflecting further erosion of Hong Kong’s legal, economic and political system. The result is that the city’s future is up for grabs. “More and more, there is a sense of futility,” Anson Chan, who for years was the city’s second-ranking government official, told The Times’s Keith Bradsher.

That is a cruel fate for a city with a storied past, especially since Britain and the United States guaranteed that its freedoms would be preserved. “America cares about Hong Kong and will continue to care long after this week’s fireworks are finished, the cameras are turned off and the partying is done,” Mrs. Albright said during the handover festivities. And she stressed the extent of America’s commercial interests there, law enforcement cooperation, United States Navy port calls, and the fact that thousands of Americans lived there.

Britain and the United States have not made Hong Kong enough of a priority in recent years. Meanwhile, China and Mr. Xi, who at last week’s Group of 20 meeting in Germany was angling to replace America as a global leader, have grown more economically and militarily powerful, more committed to repressive ways and less tolerant of places like Hong Kong that aim to set their own path.