Leung Chun-ying, center, his wife Regina, third right, and his staff members celebrate his victory in the chief executive contest in Hong Kong Sunday, March 25, 2012. (Kin Cheung/AP)

Hong Kong’s next leader, selected Sunday by a conclave of mostly pro-Beijing elites, pledged not to tamper with the extensive liberties of this freewheeling former British colony and tried to calm concern that he is too beholden to China’s authoritarian Communist Party.

“I make a solemn promise . . . that the freedoms and rights enjoyed today by the people of Hong Kong will absolutely not be changed at all,” said Leung Chun-ying, a 57-year-old land surveyor who, strongly backed by China, will take office in July as Hong Kong’s new chief executive, the post-colonial version of governor.

But in a sign of the troubles Leung is likely to face soothing the anger created by an ill-tempered and undemocratic contest, his remarks at a victory news conference were syncopated by the chants of protesters gathered outside the venue of Sunday’s ballot by 1,132 grandees.

Albert Ho, a losing candidate who represented Hong Kong’s pro-democracy camp, denounced the selection process as “ugly and disgusting” and warned of “dark days” ahead. Even some generally pro-establishment groups such as the pro-business Liberal Party voiced alarm over the outcome of an often unruly race that featured feuding tycoons, dark rumors of closet communism and a host of scandals over sex, gangsters and an illegal wine cellar.

The off-script tumult of an “election” in which fewer than 0.02 percent of Hong Kong’s 7.1 million people got to vote has strengthened a widespread feeling here that this sophisticated and prosperous city needs real elections as it struggles to find its identity as part of China and tackle a growing gap between the rich and the poor. A popular vote for chief executive is supposed to be held in 2017.

Leung, the son of a colonial-era policeman, is a populist on economic issues but a tough political operator with close ties to China and a reputation for intolerance of protests. In Sunday’s vote at a convention center overlooking Victoria Harbor, Leung, who is widely known as CY, won 689 votes of 1,132 cast by members of an Election Committee stacked with multimillionaires and Beijing loyalists. That was enough to get him the top government post but was a far more tepid endorsement than that received by two previous chief executives.

“CY will face a tough job trying heal the rift” created by a divisive campaign, Regina Ip, a politician expected to take a senior position in the new government, said in an interview Sunday evening on Hong Kong television.

An online poll conducted Saturday by Hong Kong University — in which nearly 223,000 people took part — suggested that neither Leung nor his main rival, former senior civil servant Henry Tang, has much popular support: 54 percent of those who voted chose none of the listed candidates. (Leung got just 17 percent of the online vote, ahead of Tang at 16 percent.) Unidentified hackers tried to sabotage the poll, which media in Hong Kong controlled by the Chinese Communist Party had denounced as a “political conspiracy” by anti-China “black hands.”

China’s official mission in Hong Kong, the Liaison Office of the Central People’s Government, hailed Sunday’s official ballot as “embodying openness, fairness and justice.” Chinese officials lobbied hard for Leung after initially backing Tang, whose popularity slumped in a swirl of scandal over his love life and an illegal underground “palace.”

Washington, which Beijing and Communist Party proxies in Hong Kong have regularly scolded for alleged meddling in local politics, congratulated Leung on his win. In a statement, Kurt Campbell, assistant secretary of state for East Asian and Pacific affairs, said the United States looks forward to expanding trade and other ties, and also “to continued progress toward the goal of full universal suffrage” in 2017.

Local media dubbed the contest between Leung and Tang a race between a wolf and pig, one devious, the other dim. Protesters at the convention center chanted slogans and waved banners in support of universal suffrage. A radical lawmaker, mocking the “small circle” selection process, wore a pig and wolf mask and shouted: “I am king and kingmaker.” Police used pepper spray at one point to control the crowd.

Over the din of protest outside, Leung tried to calm anxiety, particularly in Hong Kong’s pro-democracy camp, that he will roll back liberties that allow a raucous free press, frequent demonstrations, and the publication of books and magazines banned in the rest of China.

Addressing “the people who are shouting outside and protesting,” Leung said they “will have a voice” and promised to “be accountable not just to a 1,200-strong election committee.”He also denied persistent but unproved reports that he is a secret member of Hong Kong’s underground Communist Party. “I am not a so-called underground member of the Communist Party,” he said.

Tang, his main rival, fought back tears as he conceded defeat after getting just 285 votes. Ho, the pro-democracy candidate, got only 76 votes, but he was doomed from the start, as Beijing had made clear he was unacceptable. Party-controlled newspapers regularly cropped Ho out of photographs taken at events where the three candidates appeared together. Ho condemned “blatant interference by Beijing” in the contest.

Tang, who had once seemed a shoo-in, stood by remarks he made during a television debate in which he accused Leung of supporting the use of riot police and tear gas in 2003 when hundreds of thousands of people took to the streets to protest — and eventually torpedo — Beijing-backed plans for a new national security law. Leung denied the accusation. The deliberations on how to handle the protests were supposed to be kept secret, and Tang’s violation of confidentiality infuriated Chinese officials.

Although only a tiny minority of Hong Kong residents had a vote in Sunday’s ballot, candidates nonetheless sought to rally public support. Leung campaigned on issues such as housing and cast himself as a man of the people, tapping into a deep vein of anger at billionaire property developers and widening economic inequality.

Leung’s more populist approach alarmed some real estate moguls, who have long played an outsized role in Hong Kong’s economic and political affairs. But he, too, had tycoons on his side.

Opinion polls have consistently shown Leung as more popular — or at least less unpopular — with the public than Tang, the son of a textile tycoon. But Leung, also tainted by scandal, is mistrusted by many people, who see him as far too eager to please Beijing.

Hong Kong, governed by Britain for 156 years, returned to Chinese rule in 1997 as a special administrative region under a formula known as “one country, two systems.” The former colony has retained its former economic and personal freedoms.

But also largely unchanged is a political process that revolves around a tiny segment of the population. Leung is the third chief executive chosen by a narrow group of handpicked voters. This is more democratic than under British rule, when the top official, then known as governor, was simply appointed by London, but it still excludes most of the population.

Previous elections followed a tightly written script and produced no surprises. This time, however, little went according to plan, prompting China to change horses in midstream and take a more active, or at least more public, role as it struggled to keep the whole exercise under control.

Chinese officials leaned heavily on members of the selection committee to vote for Leung. Local media complained of interference by the Liaison Office. On the eve of Sunday’s vote, a prominent commentator, Johnny Lau Yui-siu, complained of meddling by an “invisible hand” after a column he wrote for Sing Pao newspaper was changed so that instead of criticizing both Leung and Tang, it endorsed Leung.

Although public opinion seems to have played some role in convincing the committee to select Leung, a far more significant factor was China, which controlled a big block of votes through a trade union and other groups that generally take their cue from Beijing. But not everyone fell into line. Despite an appeal from Chinese officials, Hong Kong’s richest tycoon, Li Ka-shing, showed unusual defiance by announcing before the vote that he would stand by Tang.

“This whole thing is a farce,” said Lee Cheuk-yan, a member of Hong Kong’s partly elected local legislature. He described the “election” as a “race between two tycoon groups. The Tang group is the existing business tycoons. The Leung camp is more the aspiring tycoons who want to take over.”