Singapore was teaching a master's degree to the world on how to deal with the outbreak of covid-19, the disease caused by the coronavirus.
Before the disease had a name, the country already had strict travel restrictions and an efficient contact-tracking operation that contained the spread of the virus.
But in recent days, the number of confirmed cases has skyrocketed. On Thursday (9), the day with the highest number of infections to date, there were 287 new patients, compared with 142 the previous day.
Most infections came from accommodation for densely populated migrant workers.
So, after avoiding it for months, Singapore is now in partial quarantine, with schools and non-essential businesses closed, and an order for people to stay at home.
Experts say that one of the richest nations in the world, which seemed to be doing everything right, has important lessons for the poorest countries.
And there is still time to put them into practice.
What was Singapore doing right?
Singapore had its first case of the new coronavirus very early. It was a Chinese tourist who arrived from Wuhan on January 23, the same day that the epicenter of the virus at that time was placed in total quarantine.
When the disease caused by the virus received its official name, covid-19, it was already spreading to the population of Singapore. But a well-rehearsed answer was in progress.
In addition to sanitary controls at airports, the government conducted exhaustive tests on each suspected case, located anyone who had come in contact with a confirmed case and confined those contacts to their homes.
The director of the World Health Organization (WHO), Tedros Adhanom Ghebreyesus, said that the country has set "a good example of approach".
For weeks, Singapore has managed to keep its numbers low and traceable, with only small groups easily contained, with no real restrictions on everyday life.
But Professor Dale Fisher, president of the WHO Global Outbreak Alert and Response Network and a professor at the National University of Singapore, told the BBC that whenever he heard people say Singapore was fine, he would reply, "So far".
"It is a really difficult disease to contain," he says.
When did things start to get worse?
The system worked until mid-March, says Professor Yik-Ying Teo, a professor at the Saw Swee Hock School of Public Health in Singapore.
It was then that, as the gravity of the situation became evident around the world, countries began to urge their citizens to return to the country.
Thousands returned to Singapore from places where governments had not been so proactive, including more than 500 people who inadvertently brought the virus with them.
Until then, returnees were required to stay at home for two weeks.
But the government said other people in the country could go on with their lives as long as no one had any symptoms.
Although new cases were on the rise, by mid-March there were already dozens a day. Most were imported or linked to imported cases, but for the first time, not all domestic cases were easily traceable.
Professor Teo says that it is now easy to say that it was a mistake not to limit the interactions of those returning. But the reality, he points out, is that "now we know a lot more about the disease compared to what was known in March".
"Now we know that asymptomatic propagation is entirely possible: it happens and it could be the main transmission factor for covid-19", says Teo.
Precisely because Singapore kept such detailed records of all cases, the country was able to learn from the internal spread.
"The measures have evolved with an understanding of where the cases come from," says Teo.
This means that countries must be cautious about relying too much on the information we have today, he explains.
For example, believing that people who have recovered are immune to future infections, when you are still not sure that this is the case.
What does Singapore tell us about the places where the virus spreads?
The import problem is now being solved with all new arrivals sent directly to quarantine.
With a small number of people entering now, the number of imported cases has been reduced to single digit numbers in the past few days.
And on Tuesday night, Singapore passed a new law that, while not using the term, is effectively a partial national quarantine.
Everyone is prohibited from leaving their homes, except for essential activities and exercises, and there are fines of up to $ 7,000 ($ 35,000) or six months in prison.
Teo says that this will be effective and emphasizes that, although there may still be an increase in the number in the short term, "it is a reflection of what happened in the last seven days; it does not mean that the measures taken are not working".
But the alarming exponential increase last week occurred in Singapore's migrant worker population: hundreds of thousands of men from poorer countries employed in the construction, transportation and maintenance sectors.
Singapore relies entirely on these workers to keep its economy going, but these are jobs where social distance is almost impossible.
In addition, the law requires workers to live in dormitories – private facilities that house up to 12 men per room, with a bathroom, kitchen and shared services.
It seems almost inevitable that these rooms will become pockets of contagion, and in fact it happened: almost 500 cases were confirmed in several groups of dormitories. Only one of them was responsible for 15% of all cases in the country.
National Development Minister Lawrence Wong said on Thursday that if he had known beforehand how quickly the virus could spread, "he would have done things differently". But many workers remained in their jobs, despite showing symptoms.
The fear is that next week these numbers will explode.
Teo says that what happened in the dormitories "is an indication of what will happen in other countries, especially in low-income countries with less resources".
"Countries in South Asia, Southeast Asia and parts of Africa … There are many communities where living conditions are very similar to those of people living in dormitories in Singapore," he says.
That is why he calls on all governments to look at their countries with "a frank and transparent lens" in terms of what they can do to "minimize the risk of an uncontrollable outbreak where people live very close".
Professor Li Yang Hsu, also of the Saw Swee Hock School of Public Health, says there is a lesson on social equality.
"The virus has been very effective in highlighting the weaknesses of our societies, and this is certainly the case for migrant worker communities," he explains.
Dorms are above all international space standards per resident, says Hsu, but a situation like this "just shows that (the standards) are inadequate".
"Perhaps a high-income country like Singapore can do better to protect the health and improve the well-being of the people who are so crucial to our society," he says.
More than 24,000 workers are now confined to their dorms, with full payment and guaranteed meals.
The government says it is also testing "aggressively" and has started moving some residents without the virus to empty homes or army camps to try to reduce density.
Comparing dormitories to cruise ships that have generated major outbreaks of infection worldwide, advocacy group Transient Workers Count Too also called this "a risky strategy", claiming that the "infection rate in dormitories could increase dramatically" and asked urgent measures to provide better accommodation.
Human Resources Minister Josephine Teo promised to raise standards in dormitories in general, saying this was "the right thing to do".
Is this proof that the virus cannot be contained?
Despite signs that the arrival of the partial quarantine was very slow, Professor Fisher says that Singapore actually acted much earlier than other countries, while the number of cases was only 100 a day.
But for confinement to be effective, he says, three things must happen.
First of all, let the broadcast be stopped, what will happen if everyone stays at home.
Then, the health system needs time and space to recover – to free up beds and for health workers to take time off.
"Third, prepare all systems: all isolation facilities, quarantine capacity, laws, contact tracking. If you do just one and two and then release (the quarantine) again, history will repeat itself" , warns.
Singapore is lucky in this respect, unlike the United Kingdom and the United States, for example, because at no time has its health system been overburdened.
It also has a completely dominant political party and complacent media, but Professor Dale says that even with "clear messages for a community that trusts the government," he is concerned that "ordinary people still don't understand the importance of their role. ..