HONG KONG (Reuters) - Two former officials and a retired judge on Wednesday won the right to compete to become the next leader of Hong Kong, a job that requires balancing the demands of Communist Party rulers in Beijing and growing calls for democracy at home.

(L-R) A combo of resigned Chief Secretary Carrie Lam, retired judge Woo Kwok-hing and resigned Financial Secretary John Tsang, during separate news conferences in Hong Kong January 16, 2017, October 27, 2016 and January 19, 2017, announcing their run for Chiief Executive. REUTERS/Bobby Yip

The next chief executive, the fourth since the former British colony returned to Chinese rule 20 years ago, must restore the public’s faith in the “one country, two systems” formula that promises extensive autonomy and freedoms not enjoyed on the mainland.

That principle has come under strain with what many residents see as creeping interference by China in the financial hub’s legal affairs and freedom of speech, not least with the shadowy detention of five Hong Kong booksellers in late 2015.

“The coming five to ten years is key,” said former head of Hong Kong’s legislature, Jasper Tsang, on the future of “one country, two systems” in a radio interview on Monday.

The contest for the five-year term is the first since mass pro-democracy street protests rocked Hong Kong in late 2014, ending with the streets being cleared and no concession by the government, denting the popularity of incumbent leader Leung Chun-ying, who is not seeking a second term.

“I hear clear and loud the people want the society to be unified again. People want to restore social harmony, so Hong Kong can move on with the many issues we need to tackle,” former civil service chief and election frontrunner Carrie Lam told reporters on Monday.

Lam, 59, grabbed the most nominations out of a 1,200-strong committee stacked mostly with Beijing loyalists. The same committee will pick the next leader in a secret ballot on March 26.

Lam, who if elected would become Hong Kong’s first female leader, said she would not rush into “extremely controversial” issues like reforming Hong Kong’s largely undemocratic system.

She was the flag-bearer for a contentious Beijing-backed political reform package that was rejected by pro-democracy lawmakers and seen as a trigger for the months-long, sometimes violent “Umbrella Movement” protests in 2014.

Slideshow ( 3 images )

DIVIDED CITY

Former Financial Secretary John Tsang, who leads public popularity polls, and outspoken retired judge Woo Kwok-hing, also made it on the ballot after nominations closed on Wednesday.

They are competing over a divided city.

Chinese President Xi Jinping has spoken against a nascent independence movement in Hong Kong, warnings echoed by many establishment figures.

But many local people were alarmed by the detention of the five Hong Kong-based booksellers by mainland Chinese agents, sparking an outcry over Beijing’s encroachment in the city.

The winner of the race will likely be sworn in by Xi on the day of the 20th anniversary of the 1997 handover on July 1.

Although most in the public have no votes, the “election” has been the talk of the city for months, with the candidates’ photos and caricatures dominating newspaper frontpages and Facebook walls.

Lam, nicknamed “fighter”, is widely rumored to be the preferred candidate of Beijing. Multiple media outlets, citing sources, reported Beijing’s number three official, Zhang Dejiang, in early February called her the “only candidate supported by the central government”.

She also received backing from many of the city’s powerful property tycoons, but the richest of them all, Li Ka-shing, has refrained from publicly throwing his support behind any candidate so far.

However Beijing’s perceived warm embrace of Lam could backfire in her popularity polls. Her promise to eventually continue political reform but only under a Beijing framework irked the democrats. Out of the 579 nominations she received, none came from them.

Her major contender, Tsang, 65, received just enough nominations, mostly from democrats, to get on the ballot.

Affectionately called “Uncle Pringles” for his resemblance to the crisps brand icon, Tsang presents a softer image more in touch with the city’s youth, even doing a Facebook live interview.

But Tsang has flip-flopped on Beijing’s framework for political reform, and his U.S. education and former post as the last British governor’s private secretary have raised concerns among some pro-establishment figures.