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.

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.