The federal unemployment rate declined to 13.3 percent in May from 14.7 percent in April, the Labor Department said Friday, a surprising turnaround after months of job losses that was hailed as a sign that the economy is recovering more quickly than projected.

The economy gained 2.5 million jobs in May as many states and counties began to reopen with the slowing of coronavirus cases nationwide.

Yet the 30 million workers who are still collecting unemployment benefits show how significantly the labor market has been upended. The unemployment rate remains the worst since World War II.

“The idea you would see job gains and the unemployment rate falling was not something really that people were expecting,” said Jay Shambaugh, an economist at the Brookings Institution. “But a 13.3 percent unemployment rate is higher than any point in the Great Recession. It represents massive joblessness and economic pain. You need a lot of months of gains around this level to get back to the kind of jobs totals we used to have.”

Some of the sectors that have been hit hardest by the crisis saw the biggest gains in May.

The upswing in restaurants, bars, and other foodservice employment accounted for about half the gains, after steep declines the previous two months. Employment in leisure and hospitality increased by 1.2 million. Construction employment increased by 464,000. And the health-care industry also recovered 312,000 jobs between April and May.

Kate Bahn, an economist at the Washington Center for Equitable Growth, said that the numbers were a sign that the recession would not be as severe as some forecasts had projected, but she cautioned against assuming the economy had turned the corner.

“Even if it is unexpected, we still have a really high unemployment rate,” she said. “We’re certainly not in recovery yet.”

Even while the impact to businesses most affected by the coronavirus begins to lessen, other economic pain has begun to filter through other sectors of the economy, Bahn said.

“We’re starting to see the spillover effects of the recession — broader more evenly distributed impacts,” she said.

Image without a caption

A substantial portion of the growth in May — about two-fifths — was driven by part-time jobs, an indication of how fragile and uneven the recovery could be. Economists agree that getting back to normal will take longer and be more challenging than recessions of the past.

Of particular concern to economists as the country has seen an outburst of anti-racism protests is that black Americans saw their unemployment rate, already higher than that of white people, increase. Whereas the unemployment rate for whites went down from 14.2 percent to 12.4 percent, the unemployment rate for blacks ticked up, from 16.7 to 16.8 percent.

Asian Americans saw their unemployment rate rise, too, from 14.5 to 15 percent. Hispanic unemployment dropped from 18.9 to 17.6 percent.

“One thing we’ve talked about this week with police protests is that we’ve left African Americans behind in lot of things. The jobs-day numbers reflect that,” said Olugbenga Ajilore, a senior economist at the left-leaning Center for American Progress. “Whenever we have a recovery, blacks are always left behind.

The crisis has touched nearly every part of the economy.

Nearly half of commercial rents went unpaid in May. Oil and gas drillers Whiting Petroleum and Diamond Offshore have filed for bankruptcy protection, as have brands such as J. Crew and J.C. Penney. American Airlines said travel was down 80 percent in May. And concerns are bubbling about another wave of layoffs as state and municipal governments are forced to drastically pare down their budgets.

Image without a caption

The layoffs have led to long lines at food banks, with efforts complicated by lack of manpower and supply shortages. And with expanded unemployment benefits set to expire July 31, unemployed workers could struggle even more to pay bills, triggering a wave of defaults on credit card balances, car payments, and mortgages.

The unexpectedly optimistic job numbers are likely to slow the push on Capitol Hill for an additional round of stimulus spending. Congressional Republicans and the White House have expressed skepticism about the need to approve or extend emergency economic aid, saying policymakers should wait to evaluate the impact of easing public health restrictions on the economy.

Many economists and congressional Democrats have said additional government funding is urgently needed to avert an even-worse economic downturn, with trillions in new spending expected to expire in the coming months.

Labor Secretary Eugene Scalia said in a statement that the report signaled that “the worst of the coronavirus’s impact on the nation’s job markets are behind us.”

“Millions of Americans are still out of work, and the Department remains focused on bringing Americans safely back to work and helping States deliver unemployment benefits to those who need them,” he said.

President Trump called the report “amazing” on Twitter and touted them at a White House news conference.

There are more indications that the pain is not being shared equally in the United States.

Hispanic workers are nearly twice as likely as whites to have lost their jobs amid the coronavirus shutdowns, according to a Washington Post-Ipsos poll, underlining the pandemic’s disproportionate toll on some racial and ethnic groups. That poll found that 20 percent of Hispanic adults and 16 percent of blacks report being laid off or furloughed since the outbreak began in the United States, compared with 11 percent of whites and 12 percent of workers of other races.

Complicating the path to economic recovery is the unusual nature of this public health pandemic. Without a cure or vaccine, the virus could deliver more suffering and economic destruction, and public health officials have warned about another wave of infections later this year.

“We’re not in a normal recession situation where a key priority is getting the unemployment rate down,” said Damon Jones, an economist at the University of Chicago. “We’re intentionally keeping the economy in a coma to try to treat it.”

The path to recovery will be particularly difficult. The nonpartisan Congressional Budget Office expects the economic effects of the novel coronavirus to exceed $8 trillion and projects the economy will not fully recover until 2030.

The CBO forecasts unemployment levels continuing at above 10 percent into 2021 — meaning that the country’s recovery could resemble the worst of the Great Recession, at least in terms of employment. Other analysts are more bullish. Moody’s Investor Services forecast that unemployment will sink to 8.5 percent by the end of the year as the country reopens and people get back to work.

The unemployment rate does not fully capture the profound depth of joblessness right now. It is only a snapshot of those actively looking for work — not college graduates who enter a world with few job prospects or others who are out of work and have made similar decisions about sitting out until the country opens back up.

It does not include people like Jennifer Bui, 28, a freelance content creator in Long Beach, Calif., who has lost most of her income from work online since the crisis began and has not paid rent since April. Bui said she didn’t think she qualified for unemployment payments and has been making do with a dwindling bank account and occasional grocery drops from her mother.

“The stimulus check was the only reason I could finish paying off April rent,” she said. That money is long gone now, she said.

Bui, who studied English in college, has since applied to work at gas stations, grocery stores — anywhere where she might be able to easily land a job. But she has gotten only one interview out of 60 or so applications, she said and was told she didn’t have the relevant skills.

“They don’t call back, or they say we hired someone else,” she said.