HONG KONG — Seventeen years after taking back control of Hong Kong, China faced the biggest challenge to its authority Tuesday as tens of thousands of residents joined a march to push for democracy.

Anger at mainland China has never been greater after Beijing warned recently it holds the ultimate authority over the freewheeling capitalist enclave despite promises to allow a high degree of autonomy after British rule ended in 1997.

Police said 98,600 people joined the rally at its peak, while organizers estimated the size at 510,000. Participants had hoped to surpass the 500,000 that turned out in 2003 for the city's biggest ever demonstration to protest against a planned anti-subversion law.

The peaceful crowds carried banners and posters urging democracy and filled half of a broad boulevard as they marched in sweltering heat and occasional rain through skyscraper-lined streets to the financial district. Thousands of police kept watch and ordered the city's iconic trolleys to shut down along the boulevard to reduce overcrowding.

Some protesters chanted, "Our own government, our own choice," while others called for the city's leader, Chief Executive Leung Chun-ying, to step down.

Some groups along the protest route sang a Cantonese song based on "Can you hear the people sing?" from the musical adaptation of Victor Hugo's novel "Les Miserables." The song, with rewritten lyrics referring to universal suffrage, has become an anthem for Hong Kong protesters.

July 1, a public holiday marking the handover of Hong Kong from London to Beijing in 1997, has become an annual day of protest. This year a focal point for demonstrators' anger is a policy document, or "white paper," released last month by China's Cabinet that said Hong Kong's high degree of autonomy is not inherent but is authorized by the central government.

"After seeing the white paper's content, we should be worried," said Jeff Kwok, 28, an export firm employee waiting at the rally's starting point in Victoria Park, where six soccer fields and surrounding areas were jammed with people. "The central government, they're trying to tell the Hong Kong people that they are the host country and Hong Kong is just one of their regions. They're trying to tell us they have absolute power to rule us."

Kwok complained that Beijing doesn't respect the principle of "one country, two systems" under which Hong Kong is allowed to retain control over much of its own affairs.

Another protester, Kennie Chan, lamented that Beijing was less restrained now in exerting its influence over Hong Kong.

"In the past, it seemed like they were doing it step by step, but now, it's obvious that they cannot stand Hong Kong people. We are not obedient anymore, and are resisting more and more," said the 30-year-old, who works as a stage manager.

Two student groups planned peaceful sit-ins overnight on a street in the financial district and outside the government headquarters after the demonstration.

Ahead of the rally, a small group of protesters burned a copy of the white paper outside a ceremony attended by officials to mark the handover.

The protest comes days after nearly 800,000 residents voted in an informal referendum aimed at bolstering support for full democracy. Beijing denounced the referendum as a political farce.

China's Communist leaders have pledged to allow Hong Kongers to vote for the city's leader by 2017. However, they've rejected calls to allow the public to name candidates, insisting instead that they be vetted by a Beijing-friendly committee like the one that has hand-picked all leaders since the handover.

But pro-democracy activists, encouraged by the strong turnout for their informal referendum, vow to shut down the city's financial district with a mass sit-in if the government fails to come up with electoral reforms that meet international standards.

Leung, Hong Kong's leader, tried to soothe tensions, saying in a speech that he'll do his "utmost to forge a consensus" on implementing universal suffrage on schedule. But the government later released a statement saying it is unlikely that public nominations will be allowed because it's legally "highly controversial."

Associated Press video journalists Stephanie Ip and Josie Wong contributed to this report. Follow Kelvin Chan on Twitter at twitter.com/chanman