HONG KONG — Carrie Lam, the chief executive of Hong Kong, has a very loyal majority in the territory’s legislature. She has the complete backing of the Chinese government. She has a huge bureaucracy ready to push her agenda.

Yet on Saturday, she was forced to suspend indefinitely her monthslong effort to win passage of a bill that would have allowed her government to extradite criminal suspects to mainland China, Taiwan and elsewhere. Mrs. Lam’s decision represented the biggest single retreat on a political issue by China since Xi Jinping became the country’s top leader in 2012.

Huge crowds of demonstrators had taken to Hong Kong’s streets in increasingly violent protests. Local business leaders had turned against Mrs. Lam. And even Beijing officials were starting to question her judgment in picking a fight on an issue that they regard as a distraction from their real priority: the passage of stringent national security legislation in Hong Kong.

[Update: Protestors return to Hong Kong streets, rejecting Carrie Lam’s apology.]

The risk for the Hong Kong government is that the public, particularly the young, may develop the impression that the only way to stop unwanted policy initiatives is through violent protests. With each successive major issue since Britain returned Hong Kong to Chinese rule in 1997, the level of violence at protests has risen before the government has relented and changed course.