The bill has fed rising fear and anger over the erosion of the civil liberties that have long set this former British colony apart from the rest of the country. The local authorities have also rejected demands for free elections and ousted opposition lawmakers, and critics say Beijing’s supporters are diminishing the independence of the territory’s courts and news media.

It was a resounding statement that Mrs. Lam’s political crisis was far from over. Finding little support from her superiors in Beijing, Mrs. Lam is still trying to thread the needle of restoring order without making concessions that would weaken her standing.

Sunday night’s apology, distributed as thousands of protesters converged on the Legislative Council building more than six hours after the march began, was the first time she had acknowledged fault in the debacle.

“The Chief Executive admitted that inadequacies of the government’s job has caused major contradictions and arguments in Hong Kong society, making many citizens feeling disappointed and upset,” the government said. “The Chief Executive apologizes to Hong Kong citizens for this, and promises that she will take on criticisms in the most sincere and humble way, striving to improve and serve the general public.”

At this juncture, Mrs. Lam is no closer to passing her unpopular legislation, which she had pushed since February as necessary to address a murder case that could only be tried in Taiwan. Critics see it as a Trojan horse that would allow Beijing to target activists, journalists and others in Hong Kong with dubious charges.

And she is now facing an expanding list of demands from the protesters, who were outraged by the harsh police response last Wednesday when some marchers tried to storm a government building, with a few throwing bricks and other projectiles at officers in riot gear. The police pushed back, hitting the protesters with batons, rubber bullets, pepper spray and more than 150 canisters of tear gas.

