HONG KONG — More than 350,000 residents of Hong Kong did something on Friday that no one in mainland China can do: They participated in a free vote over their political future. The Chinese government promptly responded by denouncing the entire exercise in bottom-up democracy as “illegal and invalid.”

The results are nonbinding because the poll is not official: It is a referendum held by a civic group on how the 7.2 million people in Hong Kong, a former British colony, will elect their head of government. The voting on Friday was through computers and mobile phones, with organizers saying they would have been pleased if 100,000 people had cast ballots over the entire 10-day voting period, which ends June 29.

Leung Chun-ying, the Beijing-approved chief executive, said on Friday that none of the three proposals on the ballot, organized by the group Occupy Central with Love and Peace, complied with Hong Kong’s Basic Law, the rules that have governed the territory since China reclaimed sovereignty in 1997. Those rules give its people civil liberties like freedom of speech and freedom of assembly, rights that are routinely denied in the rest of China.

The referendum’s organizers have vowed to disrupt the city’s central business district later this year with a sit-in protest, called Occupy Central, drawing on civil disobedience principles — Henry David Thoreau is often invoked — should the central government in Beijing and Hong Kong’s administration fail to come up with a plan for universal suffrage, promised by 2017, that meets international standards for free and fair elections. Mr. Leung, who took office in 2012, was chosen by a group of fewer than 1,200 Hong Kong residents.

Voters are being asked to choose among three plans that offer varying methods on how candidates for chief executive can be nominated. All allow candidates to make it on to the ballot by collecting signatures. That sidesteps Beijing’s efforts at screening candidates to ensure only people seen as acceptable to the central government appear on the ballot. Beijing must formally appoint any chief executive elected in Hong Kong before he or she can take office.

Mainland Chinese media and pro-mainland Hong Kong newspapers have accused Occupy Central’s organizers of risking the stability and economic health of the city. On Friday, a representative for the Chinese government denounced the unofficial referendum, reported Xinhua, the official news agency.

“Any form of so-called ‘referendum’ held in the Hong Kong Special Administrative Region that lacks a constitutional legal basis is illegal and invalid,” said the unidentified representative for the Hong Kong and Macau Affairs Office of the State Council, the Chinese government’s equivalent of a cabinet.

Amplifying Beijing’s ire over the unofficial vote, a senior official from the central Chinese government’s liaison office in Hong Kong called the ballot “an outright challenge to the Basic Law” that provides the city’s legal foundations, reported the China News Service, a state-run news agency.

The official, unnamed in the report, said the “results of the ballot have no legal efficacy or reference value” and indicated that the Communist Party would not give ground, whatever the result. “No plot by a so-called ‘civil disobedience movement’ to force the central government to make concessions on principles and on its bottom line stands any chance of success,” said the official, according to the China News Service.

Organizers of the referendum say its online voting platform has faced cyberattacks in recent days that have disrupted service and caused delays. Since the vote is informal, the organizers have no way of verifying a person’s identity. And while only permanent residents of Hong Kong are supposed to vote, when the system was tested on Friday there appeared to be no screening mechanism to keep anyone with a Hong Kong identity card number and a mobile phone from casting a ballot. Yet even this informal poll has drawn Beijing’s fury.

The standoff comes as one authoritative poll shows that dissatisfaction in Hong Kong with the way Beijing is managing its rule over the territory is at its highest level in a decade. The trend is especially pronounced among the young, with 82 percent of permanent residents aged 21 to 29 polled in December and January by the Hong Kong Transition Project expressing dissatisfaction.

One such person was Winston Chu, 21, a student at Hong Kong Baptist University studying visual arts. He said he’s also convinced his parents, who were originally indifferent to the movement, to cast votes as well.

“The government is not listening to the people,” Mr. Chu said. “I’ve already voted, to tell the government we don’t want a reform that filters who can be selected, there’s no other ways to express our wish than the referendum.”

At a rally on Friday for the unofficial referendum, a group of about 150 people gathered in Central, the main business district of Hong Kong, to sing “Do You Hear the People Sing?” — the call to popular unity from the musical Les Misérables. Many residents who said they had voted or intended to vote appeared as much concerned about conveying their anger to Beijing as choosing between the competing electoral proposals.

“The P.R.C. government is always manipulating Hong Kong,” said Amber Choi, an office worker who said she had already voted. She was referring to the People’s Republic of China. “The current government was formed by the force of the P.R.C., not by our own word,” she said.

Such feelings are being driven by concern that Hong Kong’s civil liberties, guaranteed until 2047, are being slowly eroded as the mainland’s economic and political influence grows. A policy document, or white paper, recently issued by the State Council reminded Hong Kong’s people that their liberties were granted solely by Beijing and also said that judges and other government officials must be “patriots,” language that Hong Kong’s bar association says encroaches on judicial independence. Participants in the Occupy Central movement worry that while every person will be able to vote in 2017, the nomination process will be controlled by Beijing, giving voters no real choice.

The final question on the ballot asks if the territory’s legislature should reject any election proposal that the chief executive proposes, and the National People’s Congress in Beijing approves of, that is seen not to meet international standards. This all-or-nothing approach could further antagonize Beijing.

One of the movement’s most prominent supporters is Anson Chan, who was the second-highest-ranking official in Hong Kong’s last colonial government and who kept the same post for several years after the 1997 handover from Britain, helping ease concerns over the return to Chinese sovereignty.

“We ask Beijing to honor its promise to the people of Hong Kong to deliver genuine universal suffrage,” Ms. Chan told reporters on Thursday. “We want a set of election proposals that encourages competition, that provides choice. Not a system that contains a screening mechanism so that two or three anointed candidates are put to the people for so-called ‘one man, one vote.’ I ask people to remember there is no point in having ‘one man, one vote,’ if all we are given to vote from are three puppets.”