HONG KONG — Corporate lawyers and university students, housewives and religious leaders, migrant workers and artists — a cross-section of society rose up Sunday in one of the largest demonstrations in Hong Kong’s history to protest a proposed extradition law that many fear would finally break the dam holding back China’s surging influence over the political haven.

Despite sweltering heat and storm clouds gathering overhead, several hundred thousand people turned out for Sunday’s march in defiant scenes reminiscent of the Occupy Central movement in 2014 and a mass rally in 2003 that effectively shelved a controversial sedition law backed by Beijing. Many said they were joining a demonstration for the first time because they viewed it as a last chance to voice their outrage as Hong Kong’s political freedoms shrivel.

Shortly after midnight, when the government permit for the demonstration expired, clashes broke out between police and hundreds of protesters at Hong Kong’s legislative building. Police in riot gear charged in with shields and fired pepper spray to disperse the crowd.

Legislators in Hong Kong — which was promised semiautonomy by the Chinese government under a 1997 handover agreement with Britain — are expected to vote this month on a bill that would allow local courts to consider extradition requests from countries including mainland China. 

Critics of the bill, including many members of the city’s legal and judicial community, say the measure is being rushed through Hong Kong’s legislative process. They say it would give Chinese authorities the power to extradite political opponents without local legislative oversight.

The city has been shaken since 2016 by the growing reach of Chinese security forces, which have abducted dissident publishers and business executives off the streets without the legal cover of extradition proceedings.

Two decades after it returned to Chinese control, the former British colony has also seen electoral and press freedoms shrink. The extradition law, broad swaths of Hong Kong’s legal, business and nonprofit communities say, would be a death blow to the city’s political autonomy.

Hours before the start of Sunday’s march, the Hong Kong government said the proposed measure would not “in any way impact on, interfere with, or have a chilling effect on the freedom of assembly, of the press, of speech, of academic freedom or publication; or relate to offenses of a political nature.”

Safeguards have been built into Hong Kong’s judicial system, which operates “free from any interference,” the government said in a statement.

Those assurances, which have been reiterated in recent weeks by the city’s pro-Beijing chief executive, Carrie Lam, failed to keep demonstrators at home. For hours on Sunday, they streamed out of the subway, through alleyways and from bus stops onto Hennessey Road, Hong Kong’s main east-west artery, forming a slow-moving procession that stretched for miles down the canyon-like boulevard.

Police said the turnout was about 240,000, one of the largest in recent memory. But march organizers from the Civil Human Rights Front estimated the crowd at more than 1 million, possibly making the demonstration the largest in Hong Kong history.

Chanting “Hoi Lo! Hoi Lo!” — open the street! — marchers surged through police barricades and down Hennessy Road to surround the Hong Kong legislative building. Urged on by drums and organizers with bullhorns, they crossed their arms overhead in an “X” shape and demanded “No China extradition!” and “Step down, Carrie Lam!”

In interviews, many said they were joining a protest for the first time in their lives, motivated by what they said was an alarming slide in Hong Kong’s political freedoms. Others said they feared their city is destined to fall fully under Chinese Communist Party control.

But not on Sunday.

“I’ll be honest, this probably won’t change a thing,” said Webster Kan, 46, a leather craftsman marching with his wife and 11-year-old son. “But this is our last chance to express ourselves before the gate fully opens, to say what kind of society we want, and what we want to leave behind.”

Organizers and political activists said that opposition to the extradition measure was unusually broad and that they were able to garner more support compared with previous demonstrations, such as the Occupy Central and Umbrella Movement in 2014 that sought universal suffrage.

Denise Ho, a singer and prominent activist, said Hong Kong seems politically revitalized 4 1 / 2  years after the Umbrella Movement fizzled.

“People are starting to see how horrendous this bill is that [lawmakers] are pushing ahead,” Ho said. “People are coming back. Hong Kongers who tried so hard to do something for the city and then gave up are coming back.”

Anthony Lau, a 27-year-old corporate recruiter, said he and his parents had never before participated in a protest. The extradition law would affect ­everyone in Hong Kong, he said, including the business community.

“This will effectively end the ‘one country, two systems’ policy,” Lau said, the framework that gave Hong Kong a degree of political autonomy from Beijing.

More than 3,000 lawyers and judges held a silent march last week to express concern about the bill, which they said was being advanced too hastily. Business lobbies have warned about the measure’s implications.

The turnout Sunday seemed to cut across Hong Kong society. Religious groups, housing nonprofits and university clubs mobilized their members. A politically organized group of housewives turned out, as did migrant workers from southern China.

Opposition parties distributed placards lampooning Lam with the communist hammer and sickle over her eye.

More than five hours into the march, tens of thousands of people still packed the streets surrounding the Legislative Council Complex and slowly circled the building in what they said was a test run. Organizers warned that they would escalate their protest and block the legislature if it passed the bill.

By nightfall, the government’s official news site had carried no mention of the protest. The site said Lam spent the day addressing the Hong Kong Young Academy of Sciences, where she discussed investments in science and technology.

Later, the government said it would proceed with the next hearing for the bill on Wednesday.

“The procession today is an example of Hong Kong people exercising their freedom of expression within their rights as enshrined in the Basic Law and the Hong Kong Bill of Rights Ordinance,” the government said in a statement. “At the time of this statement, we note that apart from some obstructions to traffic, the march, though large, was generally peaceful and orderly.”

After midnight, hundreds of protesters attempted to stage a sit-in at the legislative building, and police moved in. Before those skirmishes broke out, police had made seven arrests during the daytime demonstration, officials said.

Rallies in opposition to the bill were organized in nearly 30 cities across a dozen countries — including Australia, Japan, Germany and the United States.

President Tsai Ing-wen of Taiwan — the de facto independent island that Chinese President Xi Jinping has sought to absorb by promising it political autonomy — warned her people that she would never accept such a deal from Beijing.

“We stand with all freedom-loving people of #HongKong,” Tsai said in a tweet. “As long as I’m President, ‘one country, two systems’ will never be an option.”

The Hong Kong measure has also drawn attention in Washington. The Congressional-Executive Commission on China, a U.S. government agency, has warned that the extradition law could violate provisions of the U.S.-Hong Kong Policy Act, which allows for wide-reaching economic and trade relations with Hong Kong on the condition that China uphold its promise of granting Hong Kong a “high degree of autonomy.”

Activists and lawmakers including Rep. Christopher H. Smith (R-N.J.), a member of the commission, have called on President Trump to consider canceling the agreement.

Nathan Law, a former lawmaker and pro-democracy activist in Hong Kong, said he was surprised by how quickly and widely opposition to the bill has grown, including from conservative-leaning religious organizations.

Since the 2014 protests, “people have been through a period of feeling hapless and helpless because the Chinese Communist Party is so strong,” Law said. “We have been through a low point, but now people are re-energized.”

Kwong Sau-shan, a 70-year-old retiree, said she marched even though the chances of Hong Kong resisting Beijing were very slim.

“I just hope we can do something,” she said. “This is our last stand.”

Hong Kong literary event with Beijing critic mired in controversy as worries over political freedom grow

Hong Kong court imprisons ‘Umbrella Movement’ leaders for up to 16 months

Opinion: Hong Kong’s extradition law threatens our democratic spirit. But it’s also awakening it.

Today’s coverage from Post correspondents around the world

Like Washington Post World on Facebook and stay updated on foreign news