BEIJING (NYTIMES) - The Chinese economy had been firing back up. Travellers had been returning to fill trains and planes. Communist Party leaders had been celebrating their success in defeating the coronavirus.
For 56 days, Beijing had not registered any new locally acquired cases - until last week.
Now, China's capital has suffered a flare-up of infections, delivering a painful lesson that the virus can come back to ambush countries that had triumphantly proclaimed victory.
After a fresh outbreak of coronavirus infections, the city of Beijing, with a population of more than 21 million, has begun reimposing some controls used across the country earlier in the year to stifle the first wave of infections.
Airlines have cancelled hundreds of flights. Schools have called off classes, forcing students to exchange abrupt farewells. Officials sealed off neighbourhoods, and residents stuck inside complained about limited food deliveries. Medical workers tested tens of thousands of residents.
"If you just look at the numbers of cases they are still relatively small," said Dr Yanzhong Huang, an expert on China's health care at the Council on Foreign Relations who has closely followed China's epidemic.
"I've said that this kind of outbreak would be the new normal for many months to come," he said in a telephone interview. "But this is in Beijing, the political and economic centre, and so it has this symbolic meaning."
China is not the only country that has been given a sobering lesson in the persistence and wiliness of the coronavirus.
Singapore appeared early this year to have contained the scourge, only for the virus to start racing through dormitories packed with migrant workers, causing hundreds of infections per day. South Korea had early success in limiting the virus despite avoiding stringent lockdowns, only to find in the past two weeks that infections spread again when public compliance with social distancing eroded.
In New Zealand, two cases in recent arrivals from Britain were confirmed on Tuesday (June 16), only days after the government had declared the country's epidemic eradicated.
In the United States, three states that had moved aggressively to open up their economies - Arizona, Florida and Texas - all reported their largest one-day increases in cases on Tuesday.
For Beijing residents, the outbreak is a reminder that even in China - with its arsenal of high-tech surveillance tools and other authoritarian powers - the virus that causes Covid-19 can reinvade everyday life, triggering new and disruptive restrictions.
Some in Beijing worry that the hardships they so recently overcame this spring may return this summer.
"I feel that the epidemic situation is too worrisome now, I am afraid that it will become even worse later on," said Bao Gengxin, a 19-year-old high school senior, as he waited for a train to flee Beijing on Wednesday.
China's new outbreak has largely been limited to Beijing, and mostly to the vast Xinfadi wholesale produce market in the city's south. Even so, the burst of infections has created wider jitters, because orderly control of the Chinese capital is a priority for Communist Party rulers.
So far the scale of infections in Beijing is far from reaching the levels that gripped Wuhan, the central Chinese city where the virus first emerged late last year. The Beijing government said on Thursday that the number of coronavirus cases in the recent outbreak had risen to 158, after an additional 21 cases were reported that day.
The Chinese Communist Party has reacted to the latest outbreak with a typically tough approach. Much is at stake for the party's credibility: In recent weeks, officials had trumpeted their success in stifling the virus, including in a government report released this month.
Party officials in charge of Beijing, including the city's party secretary, Mr Cai Qi, have sounded chagrined about the flare-up.
"The lessons run very deep, the situation for epidemic control is very grim, and this has sounded a warning to us," said an official summary of a city leaders' meeting carried by The Beijing Daily on Wednesday.
Most Beijing streets flowed with traffic on Wednesday, though less than usual, and the public mood appeared resigned rather than panicked. Restaurants still opened, though the government has ordered them to disinfect and check employees.
But hundreds of flights to and from Beijing, roughly 60 per cent of departures, were cancelled. Fear both of infections and of quarantines prompted many passengers to stay put.
Mr Zhao Gang, a businessman and aviation writer, said the cancellations illustrated how long-laid plans - like studying abroad - could be upended from restrictions triggered by a resurgence of the coronavirus.
"Maybe you're all set to go, but before departure some sudden incident indefinitely delays the flight. What can you do?" he said in a video comment online. "These flip-flopping hassles."
At the Beijing South Railway Station, the cavernous departure hall was mostly empty Wednesday afternoon as the authorities ordered that only people who tested negative for the coronavirus could leave the city. Some of the station's fast-food restaurants and other eateries were closed.
Yet the digital departure screens showing the next 66 bullet trains indicated that not one had been canceled. Some travellers waiting in the hall were determined to leave before any further restrictions took effect.
"I'm worried that the city might be sealed off," said Mr Shi Ming, a 22-year-old student who had bought a train ticket to return to his hometown in Shandong province, eastern China. "Last night was very tense, so I rushed to snap up a ticket."
The flurry of new controls in Beijing came less than two weeks after the city government had lowered its emergency footing, seemingly confident that life could return to normal.
But Dr Gao Fu, the director of the Chinese Centre for Disease Control and Prevention, suggested that the virus might have been in circulation for a month among vendors and workers at the Xinfadi market before cases were first reported in recent days.
In a meeting of officials in Shanghai on Tuesday, Dr Gao explained that many of the latest cases were asymptomatic or mild infections, allowing the virus to spread undetected in the environment, according to Caixin, a Chinese magazine.
Across Beijing, most residents seemed reconciled to the prospect of weeks under newly tightened restrictions, after the government upgraded the health emergency to the second-highest level on Tuesday. State-run media outlets have repeatedly contrasted China's aggressive campaign against the virus with the lapses of the United States, Britain and other Western countries where infections have surged.
The heaviest controls in the Chinese capital have fallen on neighbourhoods around the Xinfadi market and two smaller markets where health investigators believe the coronavirus spread among vendors and workers, and then onto others. Nearly all the cases have been traced back to people at Xinfadi, or people who had close contact with them, and the chain of infections has spilled into other parts of China.
Beijing has already thrown considerable resources into stifling the outbreak. In recent days, city authorities have carried out nucleic acid tests for the virus among 356,000 people linked to the closed markets or living near them, city officials told a news conference on Wednesday. Still, Ms Pang Xinghuo, a deputy director of the Beijing Centre for Disease Control, warned that the number of infections spreading from the Xinfadi market could still grow, given the size of the market and the reach of its traders across the city.
"The risks of the outbreak spreading are large and control is quite difficult," she said.
While most neighbourhoods in Beijing have reinstated temperature checks and restrictions on visitors, nearly 30 neighbourhoods near the suspect markets have gone into strict lockdown, banning residents from going outside, even for groceries. The government imposed similar controls across Wuhan to stifle the epidemic earlier this year, and in both cities the controls ignited frustration.
"The neighbourhood has imposed fully sealed-off management and nobody knows what to do," said one message on Weibo, a Chinese social media service, which said residents in one locked-down block in Beijing had difficulties buying food.
"Adults can get by, but what about children and old people?" said the comment, which was widely shared.
"Couriers can't get close, and friends and relatives outside can't send in assistance either."
The city government's order to cancel classes has also worsened the anxiety of students preparing for the annual university entrance exams, searingly stressful even in normal times. To the ire of some parents, the government said it would not postpone the main examinations, scheduled for early July.
The government also has warned all residents to wear protective masks when outside, even in the hot, mugginess that covers Beijing at this time of year.
"It's very uncomfortable and a hassle," said Mr Wang Chen, a professional dancer in his twenties wearing a bright red mask. "But you have to hang on to your life."