Xinyan Yu is a journalist from Wuhan based in Washington.

Patients waiting to be tested, health-care workers making masks and face shields made from scratch, people getting laid off as the economy stumbles and government leaders struggling to assuage the panic.

This is what New York, the epicenter of the coronavirus outbreak in the United States, looks like today. And this was what my hometown Wuhan, a city of 11 million people in central China, looked like two months ago.

In February, I watched from afar as the coronavirus brought Wuhan to its knees. At the peak, hundreds died each day. Yet for many in the United States and elsewhere, the crisis felt distant and foreign.

It’s painful now to see echoes of what Wuhan went through around the world. But just as my hometown offered a warning of how a pandemic begins and spreads — a warning that most countries, including the United States, squandered — it can also offer a clue about how society can begin to emerge from a lockdown. After a two-month shutdown, Wuhan is gearing up to gradually restore normal life on April 8.

Wuhan residents were caught off guard in early January when the coronavirus started spreading like wildfire. During the darkest time when people swarmed to the hospitals, I lost count of how many heartbreaking videos I saw on social media of patients lying on the floor, families weeping over relatives who died before they could get tested, and doctors and nurses working with minimal protection.

On Feb. 7, the entire nation mourned Li Wenliang, a whistleblower doctor who was reprimanded by police for warning his colleagues about a SARS-like virus. Sadness and anger spread as people demanded apologies from officials who failed to alert the public in time and suppressed the full scale of the crisis.

Wuhan shut down the city on Jan. 23 and sealed off residential complexes as early as Feb. 8. Public transportation was suspended, and private cars were ordered off the roads. The next week, Wuhan registered 15,152 positive cases in a single day.

The city mobilized to build two makeshift hospitals with about 3,000 beds in a fortnight, and turned 16 schools, stadiums and hotels into quarantine centers with about 13,000 beds. Communist Party members like my uncle were sent to guard remote residential complexes to ensure people with no essential duties stayed indoors. More than 20,000 health workers from 29 provinces went to Wuhan to support the city at great personal risk.

As the city focused its efforts on the coronavirus, there were trade-offs and costs. Hospitals, including some treating cancer patients, had to vacate beds to make space for covid-19 patients, which meant many urgent treatments were disrupted. Some people with even the mildest cold-like symptoms were forced into home quarantine with their doors sealed or loaded into buses headed for quarantine centers.

Eventually, the number of new cases stabilized to a few hundred a day, almost four weeks after total lockdown. Though the numbers might not have captured the full picture — China’s tally does not include asymptomatic patients, for example — the spread of the virus seemed to have subsided.

By this point, the outbreak had changed people’s lives profoundly. The entire country, from major international firms like iPhone manufacturer Foxconn to China’s leading electric carmaker BYD, pivoted to producing medical supplies. Telecom companies tracked the movement of Wuhan residents, who reported their vitals on a health bar code that flashed green when one was allowed to go out. Video gaming and online education businesses boomed. Everyone, even the elderly, learned to order food and groceries in chat groups for community volunteers to deliver.

Those who did not contract the coronavirus had to endure either loneliness or intense daily squabbles. Occasionally, one would hear a random cry of release from neighbors and shrug it off.

Two months after the lockdown, there have been more than 40,000 recoveries and 2,500 deaths in Wuhan. Now, the city is gearing up for a reboot. On Monday, buses ran empty to test out the routes. Cleaners disinfected the subway for operation. Some residential complexes gave each family one entry permit per day to buy groceries; those with zero cases allowed residents to roam freely in the compound. And an inspection team has been evaluating applications to reopen businesses, ensuring offices follow precautionary measures such as temperature-taking at the entrance, social distancing lines in hallways and elevators, and disinfecting routines.

There was a rare moment of relief as things improved, but there are still fears that a second wave of cases could emerge. Many are reacting by continuing to self-isolate. Still, as the city slowly recovers from the horror, the rest of the world can look to the resilient people of Wuhan for reassurance that when there’s a beginning, there will be an end.

Read more: