It was widely believed that Mr Li's main rival for the post was the High Court judge, Benjamin Liu, who had strong backing from pro-Peking political figures but little support in the legal community.
The appointment, based on a recommendation by the independent judicial commission, came with the unanimous vote of its members who considered 140 possible candidates before opting for Mr Li.
Andrew Li is a member of Governor Chris Patten's Executive Council, or cabinet, which could have been counted as a negative point by members of the incoming administration who are keen to distance themselves from the outgoing regime. However, Tung Chee-hwa, the leader of the incoming government, has shown a desire for continuity by announcing that all heads of civil service departments will keep their jobs.
Mr Tung described Mr Li as "an outstanding lawyer with exceptional personal qualities". Members of the outgoing administration, including the Governor, also rushed to praise him. Margaret Ng, who represents the legal community in the legislature, said that if the appointment had gone "another way" it would have led to "worrying developments".
She described Mr Li as "a conservative but, at the same time, I think he is a mild reformer". Anthony Chow, the new president of the Law Society, believed that he would "bring stability" to the legal system.
The continuation of the rule of law and independence of the judiciary are widely seen as benchmarks for the preservation of Hong Kong's way of life under the new order. Mr Li's new job will be pivotal in securing this objective.Reuse content