As the coronavirus pandemic sparks global lockdowns, life has continued comparatively unhindered in places like Taiwan, South Korea and Hong Kong after their governments and citizens took decisive early action against the unfolding crisis.

At first glance, Taiwan looks like an ideal candidate for the coronavirus. The island of 23 million lies just 180 kilometers (110 miles) off mainland China.

Yet nearly 100 days in, Taiwan has just 376 confirmed cases and five fatalities while restaurants, bars, schools, universities and offices remain open.

The government of President Tsai Ing-wen, whose deputy is an epidemiologist, made tough decisions while the crisis was nascent to stave off the kind of pain now convulsing much of the rest of the world.

“Countries like Taiwan are exemplary,” Microsoft founder Bill Gates, who is funneling his billions into vaccine research, told Fox News this week.

“And so they won’t either have the disease burden or the economic effect that other countries will have.”

Much like antibodies are formed to fight off the next infection, Taiwan’s response was forged in a previous epidemic — the deadly SARS outbreak in 2003.

This time the island was ready.

Before Wuhan was even locked down, Taiwan activated its Central Epidemic Command Center, began screening arrivals, rolled out comprehensive testing and deployed detailed contact tracing.

It soon closed off all travel from China, its biggest trading partner, even when the World Health Organization — a body it is frozen out of by Beijing — was advising against such a step.

A recent study in the Journal of the American Medical Association documented 124 early actions the command center took at a time when much of the rest of the world was barely considering the possibility of a pandemic.

Jason Wang, a Stanford Medicine professor who co-wrote the study, said those steps bought Taiwan crucial time to ramp up testing and mask production.

“Two weeks is a lot of time when the virus is spreading exponentially,” he said.

“Before definitive evidence is available, it is better to be cautious when you are dealing with an unknown virus. We all learned a hard lesson,” he added.

South Korea is being hailed in a different way — as a country that managed to flatten the infection curve despite a major outbreak.

In late February the coronavirus exploded in the southern city of Daegu via a cluster within a religious group.

At its peak, 909 new infections were found in one day. In total more than 10,000 people have been confirmed infected in South Korea with 192 deaths.

But six weeks on, Daegu registered its first single-digit daily rise in confirmed cases.

Meanwhile much of the rest of South Korea is running comparatively smoothly with widely adopted social distancing measures remaining advisory, not compulsory.

Experts have cited widespread testing as a major factor as well as contact tracing and quarantines for all positive patients.

South Korea had a workable test within just a few weeks of the government issuing tenders and is now a major exporter of kits around the world.

Similar successes have been seen in Hong Kong and Singapore, although their outbreaks are beginning to worsen.

Both cities moved comparatively fast to screen arrivals from China and used contact tracing to keep initial infections down.

That allowed them to avoid the kind of complete lockdowns seen across a growing swathe of the globe.

But infections have spiked in recent weeks as residents return home to flee the growing outbreaks in Europe and North America.

Hong Kong now has 936 confirmed cases and four deaths while Singapore has 1,375 and six deaths.

Both cities are now ramping up enforced social distancing measures.

In recent days Singapore announced it would close schools and workplaces as well as quarantining some 20,000 migrant workers in their dormitories.

Hong Kong’s schools have been shuttered since early on and most civil servants are working from home.

But the government recently banned more than four people gathering in public and shut down entertainment venues including bars, karaoke businesses and mahjong parlors.

Bernard Chan, a top advisor to city leader Carrie Lam, recently warned tougher measures could be rolled out if infections continue to rise.

“We could simply impose a much bigger lockdown across the city and tell all nonessential businesses to close so nearly everyone stays home most of the time for a few weeks,” he told RTHK news.

RELATED PHOTOS A man speaks to a nurse at a COVID-19 testing booth outside Yangji hospital in Seoul in March. | AFP-JIJI

Children leave their elementary school at the end of the day in Xindian district, New Taipei City, in early March. | AFP-JIJI

(FILES) In this file photo taken on March 29, 2020, Customers sit in a cafe where tables have been taped off to make sure people adhere to social distancing in Hong Kong in late March. | AFP-JIJI