Thomas Maresca

Special for USA TODAY

Communist China's favored candidate was elected as Hong Kong's chief executive Sunday in a vote assailed by pro-democracy activists as neither free nor fair.

Carrie Lam was selected by a 1,194-member committee made up mostly of loyalists to the Chinese government to be chief executive, Hong Kong's highest post. Lam, 59, who was widely expected to win, also becomes Hong Kong’s first female leader.

Lam, the former deputy to unpopular outgoing Chief Executive Leung Chun-ying, received 777 votes to defeat her opponents, former finance secretary John Tsang, who got 365 votes, and former judge Woo Kwok-hing, who had 21 votes. In public polls, however, Tsang was the more popular candidate and had the support of the pro-democracy bloc of electors, who make up more than 25% of the committee.

Joshua Wong, 20-year-old 'Umbrella' rebellion leader, decries rigged Hong Kong election

Sunday’s election was the first race for chief executive since the student-led pro-democracy protests of 2014 sparked by the "umbrella" movement. The movement protested Beijing’s decision to deny open nominations for the leadership post.

Lam, in remarks after the election, vowed to work on healing social and political divisions that have long gripped Hong Kong as it navigates a delicate relationship with mainland China.

“Hong Kong, our home, is suffering from quite a serious divisiveness and has accumulated a lot of frustrations,” she said after her victory was announced. “My priority will be to heal the divide."

When Britain handed Hong Kong to China in 1997 after more than a century of rule, China agreed to a policy of “one country, two systems:” The communist regime would regain sovereignty, but the bustling Asian financial hub would maintain its open economic and political systems.

For advocates of greater democracy in Hong Kong, Lam’s election was predictable. “This result is a nightmare to Hong Kongers,” wrote Demosisto, the political party founded by pro-democracy activists Joshua Wong, Nathan Law and other student leaders.

“It is a selection rather than an election,” Wong, 20, said in an interview last week. “Who becomes chief executive is still under control of the Beijing government.”

On Sunday, pro-democracy groups held protests outside the election venue, and some pro-democracy electors raised chants for universal suffrage as the votes were tallied.

Lam’s five-year term will start July 1, a politically charged date that marks the 20th anniversary of Hong Kong’s handover to China.

In recent years, many in Hong Kong have grown alarmed by China's increasing influence, including the 2015 secret detention of five Hong Kong publishers and booksellers, plus the suspected abduction of China-born billionaire Xiao Jianhua from a Hong Kong hotel who later turned up on the mainland.

Beijing’s influence is also seen in an upcoming trial of four democratically elected members of the Hong Kong Legislative Council. The four legislators, including student leader Law, face being removed by Hong Kong's Justice Department over charges that their swearing-in oaths were invalid because they did not repeat word-for-word a strict pledge of allegiance to mainland China.