(NYTIMES) – The US economy climbed out of its coronavirus-induced hole in the spring as vaccinations and federal aid fuelled a surge in consumer spending at restaurants, resorts and retail stores.

The revival brought gross domestic product (GDP) back to its pre-pandemic level in the second quarter, adjusted for inflation – a remarkable achievement, exactly a year after the economy’s worst quarterly contraction on record. After the last recession ended in 2009, GDP took two years to rebound fully. But the rise of the Delta variant of the coronavirus could threaten those gains, just as the federal aid programmes that helped bolster the recovery are coming to an end.

GDP, the broadest measure of economic output, grew 1.6 per cent in the second quarter of the year, up from 1.5 per cent in the first three months of the year. On an annualised basis, second-quarter growth was 6.5 per cent

Robust investment in the quarter signalled that businesses were betting on continued growth. But the recovery is far from complete. Output is significantly below where it would be had growth continued on its pre-pandemic path, and other economic measures remain deeply depressed, particularly for certain groups. The US has nearly seven million fewer jobs than before the pandemic.

“The good news is, this is all occurring much more rapidly than after the financial crisis,” said Ms Diane Swonk, chief economist for accounting firm Grant Thornton. “The bad news is the pain was much worse.”

Indeed, second-quarter growth might have been stronger had it not been for supply chain disruptions and labour challenges that made it hard for many businesses to keep their stores staffed and shelves stocked.

Inventories fell and imports rose as companies turned to overseas suppliers and their own warehouses to meet demand where domestic producers could not. And despite a red-hot housing market, residential construction fell 2.5 per cent in the second quarter as builders struggled to get materials and workers.

Those issues, combined with a rush of consumer demand, led to faster inflation in the second quarter. Consumer prices rose 1.6 per cent from the first quarter of the year to the second. Without adjusting for inflation, economic output rose 3.1 per cent.

Now a new threat is emerging in the highly contagious Delta variant of the coronavirus, which has caused cases to soar in much of the United States.

Few economists expect a return to widespread business shutdowns or stay-at-home orders. But if the resurgent virus leads to renewed caution among consumers – a reluctance to dine at restaurants, hesitation about booking a late-summer getaway – that could weaken the recovery at a crucial moment.

“The reason that is concerning is that this burst of activity around reopening has been driving the economy the past couple months,” said Ms Michelle Meyer, head of US economics at Bank of America. “Even a modest change in behaviour could show up more meaningfully this time around.”

There is little evidence so far that either the Delta variant or inflation is making a dent in consumer demand overall. Consumer spending rose 2.8 per cent in the second quarter, and more recent private sector data has yet to show a significant slowdown.

Spending on services was particularly robust in the second quarter as widespread vaccinations and falling virus cases led Americans to return to restaurants, nail salons and other in-person activities. But spending on goods remained strong as well, reflecting the healthy financial position of many households after successive rounds of government aid, said Ms Aneta Markowska, chief financial economist for Jefferies, an investment bank.

Personal income after taxes fell from the first quarter, when stimulus payments provided a temporary lift, but is still 6.4 per cent above its pre-pandemic level after adjusting for inflation. And Americans are collectively sitting on trillions more in savings than they had before the pandemic.

“The story of the last two decades was that every time you got a price increase somewhere, it caused immediate demand destruction because household incomes and balance sheets were so constrained,” Ms Markowska said. “Today that’s not the case. Household finances are in the best shape they’ve been in decades.” Still, the recovery has been highly unequal.

Data from Affinity Solutions, which tracks the credit and debit card transactions of 90 million US consumers, shows that recent increases in spending have been driven by high-income households. Employment among people with a college degree – many of whom could work from home – fell less in the pandemic and has already returned to its previous level, while employment among those with a high school diploma or less remains millions of jobs below that benchmark.

“The people who were working and did not have an interruption in their pay were able to save more money and now have this pent-up demand,” said Dr Kristen Broady, a Dillard University economist and a fellow at the Brookings Institution. For low-income households that fell behind on rent or bills during the pandemic, she said, “their situation is even worse than it was before”.

And this time, workers and businesses may have to face the pandemic without much help from the federal government. Roughly half the states have cut off enhanced unemployment benefits in recent weeks, and the programmes are set to end nationally next month. A programme to protect pay cheques, which helped thousands of small businesses weather the crisis, is winding down. A federal eviction moratorium is due to end this week. And there is no sign that Congress intends to pass a fourth round of direct cheques to households.

Dr Nela Richardson, chief economist for ADP, the payroll processing firm, said the second quarter might stand as a high-water mark for the recovery, when federal aid was still flowing and when vaccinations and the lifting of restrictions gave people an opportunity to spend.

“All the winds were going in one direction, which was to push the economy forward,” she said. “The more interesting question is: Where do we go from here?”