Hong Kong's leader delivered a defiant final speech to the legislature Thursday, saying she was "not ashamed" of her record despite being set to end her tumultuous term with her approval ratings at an all-time low.

Carrie Lam's five-year tenure as chief executive coincided with massive and often violent pro-democracy protests, Beijing's imposition of a draconian national security law and a coronavirus outbreak that left more than 9,000 dead.

She is on track to depart at the end of June with the lowest approval ratings of any Hong Kong leader since the city's handover from British to Chinese rule in 1997.

At her last appearance in Hong Kong's legislature, an emotional Lam told lawmakers: "I can boldly say I have delivered a report card I am not ashamed of, and have put a full stop to my 42 years in public service."

Lam said her term had marked the "most difficult" period in Hong Kong's post-handover history.

At the height of the pro-democracy protests in 2019, according to a leaked recording, Lam said in a closed-door meeting that she had caused "unforgivable" havoc and would quit if given a choice.

But on Thursday she said she had never considered resigning, citing the support of Beijing and her family, as well as a sense of "historic mission".

Since the demonstrations, Beijing has remoulded Hong Kong in its authoritarian image, imposing a national security law used to effectively quash dissent, along with electoral reforms that have ousted pro-democracy figures from the legislature.

Lam said Hong Kong's governance had improved after Beijing intervened to put "patriots" in power.

Prior to the rule change, she said, her government had been frustrated by the confrontational attitude and frequent filibusters in the city's politics.

Her speech was warmly applauded by the "patriots-only" legislature, formed in December after the electoral system was overhauled.

Lam is on track to depart with the lowest approval ratings of any Hong Kong leader since the city's handover from British to Chinese rule in 1997
Lam is on track to depart with the lowest approval ratings of any Hong Kong leader since the city's handover from British to Chinese rule in 1997 POOL via AFP / Vincent Yu

Lam's time in office also saw her grappling with the challenge of the coronavirus pandemic.

Despite keeping the virus largely under control initially, an Omicron-fuelled fifth wave that broke out at the beginning of this year left thousands dead.

Hospital wards were flooded with patients and morgues overcrowded with bodies, prompting critics to fault the government for being unprepared despite two years of breathing room.

Lam's administration has hewed to China's strict zero-Covid strategy, which uses rapid lockdowns, mass testing and travel curbs to eliminate even the smallest outbreaks.

It has prioritised opening the border with mainland China over reopening to international travel, leaving a city that was once a global logistics and transportation hub largely cut off from the rest of the world for most of the pandemic.

On Thursday, Lam dismissed the possibility of reopening the border with the mainland in the near future, saying it was a complicated challenge.

"If we use what was discussed from last September to December as a basis, in the short term we do not see the possibility," Lam said, referring to policy negotiations between Hong Kong and Beijing before Omicron hit.

"As it is clear now, most overseas countries use one set of anti-epidemic theories and measures, and our country has another set of theories and measures," she added.

"With us in the middle, we have to carefully assess what measures to take... which can look after both sides."