Updated

The Hong Kong government's controversial Beijing-backed election reforms were defeated in the legislature Thursday but the crucial vote came to a confusing anticlimax as pro-establishment lawmakers accidentally failed to vote for it.

After a lengthy debate, 28 lawmakers voted against the proposals, which sparked huge street protests in the southern Chinese city last year.

Eight others voted in favor.

However, in a bizarre scene moments before the vote took place, most of the pro-establishment lawmakers walked out of the legislature chamber and ended up not casting their votes.

Lawmaker Jeffrey Lam later blamed a "communication gap," explaining that they were waiting for a fellow lawmaker who was ill to return to the chamber. They left even after their request for a 15-minute break was rejected by the legislature president.

The government needed at least 47 of the 70 lawmakers to vote in favor of the proposals.

"If you look at their farcical behavior, you can't help but feel very sorry for Hong Kong that we are in the hands of such people," pro-democracy lawmaker Emily Lau said after the vote.

The government had proposed changes to the way the southern Chinese financial hub's top leader is chosen. Its reform package offered direct elections for the first time starting in 2017 but required all candidates to be screened by a 1,200-member panel of Beijing-friendly elites like the one that currently handpicks the leader.

Pro-democracy leaders criticized it as a "fake democracy," saying Beijing is breaking its promise to eventually grant genuine universal suffrage to the city, a special administrative region of China.

Hong Kong is a former British colony that retains its own legal and financial system and civil liberties such as freedom of speech not seen on the mainland.

The bill's defeat comes at the end of Hong Kong's most tumultuous year since Beijing took control in 1997 after a century and a half of British colonial rule. Tens of thousands of people took to the streets last year to protest the central government's election screening requirement.

For 11 weeks, activists camped out on major thoroughfares in three neighborhoods to demand greater electoral freedom but eventually left the streets after exhaustion set in and Hong Kong's unpopular leader, Leung Chun-ying, refused to offer any concessions.