By Josh Mitchell

The U.S. labor market snapped back to life in May, restoring a chunk of the jobs it lost in the first two months of the coronavirus pandemic while facing big obstacles in the months ahead.

After two months of carnage, employers added 2.5 million jobs last month, the most jobs added in a single month on records dating from 1948. The jobless rate fell to 13.3% from April's 14.7%, a post-World War II high.

Employment remained down by nearly 20 million jobs, or 13%, since February, the month before the pandemic prompted states to shut down huge segments of their economies. By comparison, the U.S. shed about 9 million jobs between December 2007 and February 2010, a period that covered the recession caused by the financial crisis.

Hurdles remain, including the prospect of a second virus outbreak, pandemic-related safety regulations and social unrest from the May 25 killing of George Floyd.

But the jobs report boosted hopes that the economy has moved beyond the worst fallout from the pandemic and may recover more quickly than expected. Stocks surged on the news, with the Dow Jones Industrial Average climbing more than 3%, the S&P 500 up nearly 3% and the Nasdaq heading toward a closing high.

"This is definitely in the right direction and suggests the U.S. economy may be faring better than some of those worst-case scenarios," said economist Lindsey M. Piegza of financial firm Stifel Nicolaus & Co. "But it remains to be seen if this is indicative of an ongoing positive trend or if this reflects the bare minimum of the labor force needed to reopen the economy."

Economists still expect a slow and choppy recovery. Government aid programs for households and businesses -- which have pumped trillions of dollars into the economy -- will start to run out this summer and fall. Many consumers and workers remain fearful of the virus and are staying at home. And protests and looting following the killing of Mr. Floyd, a black man who died in police custody in Minneapolis, led many businesses to board up and close.

Still, a significant number of Americans appear ready to come back to the marketplace, and businesses are eager to reopen to accommodate them. Restaurants and bars added 1.4 million workers last month -- more than half the overall job gain -- as new virus infections eased and many states began lifting shutdown orders. Other industries adding workers included construction, health care and retailers -- among the industries that had been quickest to let go of workers in March and April.

"The No. 1 customer call that comes in is not, 'Can I place an order?' It's, 'Do you have dining?'" said Matt Friedman, chief executive of Wing Zone, an Atlanta-based restaurant chain. In recent weeks the company added five to 10 workers to each of its two taverns in Georgia that recently reopened after being shut down since March.

Mr. Friedman cautioned, however, that the two restaurants are operating at far below capacity to comply with rules to prevent further spread of the virus, including increased the space between tables. That will limit, for now, how fast he can rehire. "It's almost like if you took a football team and put half the players on the team on the field," he said.

Sung Won Sohn, an economist at Loyola Marymount University, said the aid that Congress approved to help households is stoking demand. While 21 million workers remained employed last month, research suggests that more than half of those laid off during the pandemic are earning more than they did at their jobs, thanks in part to stimulus checks and extra $600 a week in unemployment pay approved by Congress.

"People have been cooped up in houses and apartments for weeks and they're anxious to get back," Mr. Sohn said. "They have money to spend -- disposable income."

Despite last month's gains, the jobless rate is still historically high -- nearly four times the rate in February. Jobs remain down by 19.6 million from February.

In May, a broader measure of unemployment -- including jobless workers, those working part time and those who have given up the job search because they are too discouraged -- stood at 21.2% in May. Many other workers have taken pay cuts. Gregory Daco, chief U.S. economist at Oxford Economics, estimates that at least half of the workforce has lost a job, lost hours or took a pay cut.

The jobless rate for Latinos was 17.6% and for African-Americans 16.8%, far higher than for Asians at 15% and whites at 12.4%. Women were more likely to be unemployed than men.

In Portland, Ore., Kate Rafter had spent five weeks on a furlough when she returned to work the first week of May at a nonprofit that takes children on field trips around the Pacific Northwest. Two days after she returned, her boss told her she was being laid off. Many parents had canceled plans to send their children on trips given the risk of catching the virus. The nonprofit said it could no longer afford to keep Ms. Rafter on as a business-systems analyst.

Now, she is living off unemployment benefits and the stimulus check Congress provided to many households. She is hopeful, though, because she has seen a number of job postings in her field. "I think I'll be able to find something," she said. She has spent recent weeks knitting hundreds of masks which she has donated and decluttering her parents home.

There is at least one big sign that much of the economic damage from the pandemic will be temporary: More than 80% of the people who lost jobs during the pandemic expect the loss to be temporary.

Those permanently separated from their jobs totaled 3 million in May, a low level compared with prior downturns. In October 2009, when unemployment peaked after the financial crisis, there were 8.3 million such workers.

Manufacturers also are adding jobs. Tuff Shed Inc., a Denver-based manufacturer of backyard storage sheds, has called back the 500 employees it furloughed in late March, one-third of its total workforce. The privately held company is now trying to hire about 300 more employees for its 52 production sites as demand surges for its prefabricated wooden buildings.

Tuff Shed's buildings are being used as makeshift offices and home-school classrooms by families marooned in their homes by the pandemic, said Phil Worth, the company's vice president of marketing. The most popular office shed measures 10 feet by 12 feet, about the size of a bedroom, with prices starting at about $4,300.

Tuff Shed's May sales were up 26% from a year earlier and soared 90% from April, Mr. Worth said. Home Depot accounts for about half of its sales.

"The amount of demand is shocking," he said. "We definitely want to add production capacity. People don't want to wait a long time once they've made a decision to buy a building."

Nearly 90% of Fiat Chrysler Automobiles NV's hourly factory workforce in North America has returned to work, the company said in a statement. Fiat Chrysler and its U.S. competitors General Motors Co. and Ford Motor Co. restarted factory work in North America on May 18 and have since been ramping up production.

Job postings rose in the past week by 10%, according to an analysis of internal data by ManpowerGroup North America, a job-placement company. Some of the highest demand is for workers in information technology, including for software developers, said Becky Frankiewicz, the group's president. She suspects that is because many businesses are now using apps for delivery services, or software such as Zoom to hold virtual meetings. "As states start to reopen we're seeing an increase in demand, " she said. "When will we be back? We got here overnight. We won't return overnight."

Friday's report, based on a survey of households and businesses in mid-May, offered a snapshot of the labor market before protests and looting after the death of Mr. Floyd.

Penn Quarter Sports Tavern in Washington, D.C., laid off all 28 employees in early March after city leaders ordered nonessential businesses to close during the pandemic. When the city began the first phase of reopening last month, the restaurant rehired about half of its employees in the hopes of reopening the bar this week, said owner Mike Brand.

But protests and looting prompted him to board up his business and delay the opening by at least a week.

"We had every intention to be operating right now but now we're back stuck in the mud," Mr. Brand said. "This extra week, maybe two with the riots, it's taking a huge financial chunk."

He said he has been trying to rehire more of his former employers but he has run into a hurdle: Many of his servers and bartenders have declined offers to come back to work, he said. Some are fearful of catching the virus; others don't want to give up their unemployment benefits, which currently pay them more than they would earn at the restaurant. He believes that as enhanced unemployment benefits -- the federal payments of $600 a week -- expire, he will have an easier time finding workers.

Economists believe the economy will rebound late this year and many jobs will be recovered. Forecasting firm Moody's Analytics projects the unemployment rate will fall to 8.5% by year-end and that the annual job loss will settle at 8 million.

Bob Tita contributed to this article.

Write to Josh Mitchell at joshua.mitchell@wsj.com