Until recently, Hong Kong was considered a poster child in its handling of the Covid-19 pandemic.
Despite sharing a border with mainland China, where the first cases were reported, Hong Kong kept its infection numbers down and was able to avoid the extreme lockdown measures introduced in parts of China, Europe and the US.
But now, it's been hit by not even a second, but a third, wave of infections. The government has warned its hospital system could face collapse, and it's just had a record high number of new infections in a day.
What went wrong, and what lessons are there for countries juggling both the pandemic, and the economic pain caused by lockdown?
Quarantine exemptions and 'loopholes'.
Hong Kong had its first Covid-19 cases in late January, leading to widespread concern and panic buying, but infection numbers remained relatively low and the spread was controlled quite quickly.
It experienced what became known as its "second wave" in March, after overseas students and residents started returning to the territory, leading to a spike in imported infections.
As a result, Hong Kong introduced strict border controls, banning all non-residents from entering its borders from overseas, and everyone who returned was required to undergo a Covid-19 test and 14-day quarantine.
It even used electronic bracelets to track new arrivals and make sure they stayed at home.
That, combined with the widespread use of masks and social distancing measures, worked - Hong Kong went for weeks without a locally transmitted case, and life seemed to be heading back to normal.
So how did the "third wave" - that has led to more than 100 new cases for nine days in a row - arrive?
Hong Kong on verge of 'large-scale' outbreak.
"It's quite disappointing and frustrating because Hong Kong had really got things very much under control," says Malik Peiris, Chair of Virology at the University of Hong Kong.
He believes there were two flaws in the system.
First, many returnees opted to quarantine for 14 days at home - an arrangement that's common in many countries including the UK - rather than in quarantine camps.
"There is a weakness there because other people in the home are not under any form of restriction, and will still be coming and going," says Prof Peiris.
However, he believes the more serious problem came from the government's decision to exempt several groups of people from testing and quarantine when they entered Hong Kong.
Hong Kong had exempted about 200,000 people, including seafarers, aircrew and executives of companies listed on the stock exchange, from quarantine.
It said the exceptions were needed to ensure normal daily operations continued in Hong Kong, or because their travel was necessary to the city's economic development.
As an international city and trading port, Hong Kong has a high number of air links, and many ships change crews there. The territory also depends on imports from mainland China and elsewhere for food and essential goods.