Dozens of workers arrive at 8 each morning, wearing masks and gloves and under strict orders to remain six feet apart. The lights are dim and the mood somber.

The Neiman Marcus employees had been summoned back to work at a shuttered store in a shuttered mall in Pennsylvania, two weeks after the coronavirus pandemic forced the luxury retailer to close all 43 of its U.S. locations temporarily. Their task: to fill hundreds of online orders for deeply discounted Moncler jackets, Dior sunglasses, Ugg boots and the like.

The workers, doing decidedly nonessential work, offer a vision of the impossible choices facing much of the retail industry as it is being crushed by the coronavirus pandemic. While retailers have suspended operations at hundreds of thousands of “nonessential” stores nationwide because of the outbreak, some are reporting skyrocketing online sales thanks to at-home shoppers, relentless promotions and markdowns.

For a growing number of companies, the Web business is all that separates them from bankruptcy. For those that had been struggling even before the pandemic — due to the retail sector’s long slide or, like Neiman Marcus, massive debt loads — it may not be enough.

But it is causing workers to fulfill orders few need, with many resentful of the situation even if they need the paycheck.

“It [has] not been easy emotionally or mentally,” said a Neiman Marcus employee at King of Prussia Mall near Philadelphia who spoke on the condition of anonymity out of fear of retaliation. “Big businesses are willing to sacrifice low-level employees for their gain.”

But keeping employees sidelined also is fraught. Retailers were fighting for survival long before the coronavirus capsized the economy. More than 26 million Americans have filed for unemployment benefits in the past five weeks, sending consumer spending off a cliff and positioning retailers for months more of lost sales.

The Gap this week warned it could soon run out of cash to cover routine costs. The company, which also owns Banana Republic and Old Navy, didn’t pay rent in April and said it is talking to landlords about permanently closing some stores.

Amber Seikaly, a Neiman Marcus spokeswoman, said the retailer is trying to balance the safety of its employees with its long-term viability. “Maintaining our online business is one way in which we are able to do that,” she said.

Much of the economy will face the same balancing act as pressure to reopen intensifies. Restaurants, bookstores, salons and many other establishments without Neiman Marcus’s cachet will be able to hang on for only so long before the deep recession caused by the pandemic pushes them to the brink.

“It’s a really fine balance,” said Neil Saunders, managing director of GlobalData Retail. “A company like Neiman Marcus needs the cash — if it doesn’t make these sales, it’s probably going to collapse in a heap, and everybody’s going to be out of a job.”

Nearly every large retailer — aside from supermarkets, pharmacies and a handful of other “essential” businesses — has closed stores, rendering shopping malls irrelevant. Tens of millions of Americans are working remotely and unable to socialize at restaurants and movie theaters, leaving little need for seasonal clothing, new shoes or other discretionary goods. Retail sales plummeted 8.7 percent in March, their worst drop on record, and analysts say the decline is certain to accelerate as the coronavirus crisis intensifies. Hopes of a quick economic recovery have faded even as parts of the country begin to reopen, as many consumers will be loath, or unable, to return to their pre-pandemic ways.

As a result, retailers have become increasingly desperate, offering free next-day shipping and deep discounts to win over homebound customers.

“The tension for retailers is between staying open right now versus not, which becomes a bigger question of salvaging sales, staying in business and surviving long term,” said Sucharita Kodali, a retail analyst for Forrester Research. “There is this huge gray area: Do office supplies count as essential? Does apparel? The higher end you go, the grayer it becomes.”

Macy’s, which furloughed most of its 125,000 employees in late March, was advertising 50 percent discounts on beauty products and 40 percent off clearance items. “Relax, restore & really enjoy that me time,” it said on its website, next to promotions for $64 Estee Lauder eye cream and $70 Laura Mercier body lotion. Pier 1, which filed for bankruptcy in February, was offering 25 percent off furniture during its Better at Home Event, while Saks Fifth Avenue was promoting “loungewear to love” like $990 hoodies and $240 headbands.

“I call it luxury panic-buying,” said Tabitha Smutz, who works for a company that sells custom slingshots in Asheville, N.C. “You can tell that a lot of customers are just bored and browsing online, going, ‘Oh, that’s something fun I can do in my backyard.’ It’s been busier than the busiest Black Friday we’ve ever had.”

She and two colleagues are working around-the-clock to fill more than 200 orders a day, which is about four times the usual volume. “It was super sudden,” Smutz said. “Sales started snowballing as soon as the stay-at-home orders started going out across the country.”

U.S. e-commerce sales rose 25 percent in the two days after President Trump declared a national emergency on March 13, according to Adobe Analytics, which measures transactions from 80 of the nation’s top 100 retailers. Retailers saw large boosts in demand for online groceries, fitness equipment and computers.

The increased workload has led to discord among warehouse and delivery workers. Employees at Amazon have called on the retail giant to stop filing nonessential orders and loosen worker quotas during the pandemic. (Jeff Bezos, the founder and chief executive of Amazon, owns The Washington Post.)

At Target, where online sales nearly quadrupled in April, executives say every day feels like Cyber Monday.

It’s a similar story at a Sephora warehouse in Las Vegas, where employees are taking on additional shifts to keep up with growing demand for eyeliner, face masks and tiny cosmetics fridges, according to an employee who spoke on the condition of anonymity for fear of retribution. Workers are scared and angry but afraid of losing their jobs. Some have begun taking short bursts of unpaid leave as their $1,200 stimulus checks arrive from the government.

“It feels like prison,” said the employee, who is working 60-hour weeks. “Makeup shouldn’t be essential in a time like this.”

Mike Racer, Sephora’s senior vice president of supply chain, said the company is providing masks and employee temperature checks, and is temporarily paying workers an extra $2 per hour. The company, he said, hasn’t added any new “savings events” because of the pandemic.

“We are doing everything we can to ensure our [distribution centers] are a safe working environment for all employees,” he said. Sephora is owned by the luxury conglomerate LVMH, which has about $58 billion in annual revenue.

At Neiman Marcus, employees were called back to the King of Prussia store via text message and email in early April, two weeks after the company closed all of its stores to the public, according to internal documents obtained by The Washington Post. The company is providing masks and will soon begin temperature checks for employees at the three-story anchor store.

But the precautions have done little to assuage employees’ fears, according to the worker. Last week, they were notified someone at the store had tested positive for coronavirus.

Seikaly, the Neiman Marcus spokeswoman, said the company is limiting the number of employees who work at one time and is regularly cleaning and disinfecting its stores. Employees who don’t want to work, she said, can take unpaid leave. “Those who are not comfortable with coming in are not required to report into work.”

Neiman Marcus is widely reported to be considering bankruptcy as soon as this week. The retailer, which has nearly $5 billion in debt, missed its latest interest payment last week. “Sadly, Neiman’s financial distress will come as no surprise to anyone,” one of its debtors, the hedge fund Marble Ridge Capital, said in a statement. Most of the company’s 14,000 employees are furloughed through the end of May.

Meanwhile, its website is awash in discounts. “Upgrade your downtime,” promotional emails say, promising 40 percent markdowns and a chance at $600 gift cards.

Another luxury retailer, TheRealReal, is offering $25 to new shoppers, as well as an extra 20 percent off most items on the online consignment site. Missoni coats, Burberry dresses and Diane von Furstenberg scarves were recently discounted 40 percent.

But employees at the company’s New Jersey warehouses, where at least four workers have tested positive for the virus, are increasingly afraid, according to a worker who spoke on the condition of anonymity. Employees, they said, are sorting through an avalanche of used designer wear, including some that arrive dirty or soiled.

Erin Santy, a spokeswoman for TheRealReal, said the company has reduced the number of employees at its warehouses and is staggering work shifts. It also is giving workers two additional weeks of paid leave and approving all requests for time off.

“None of these jobs are public-facing roles, they are in a controlled, sanitized environment,” she said in an email. “Any employee can meet with their manager and ask to be laid off and then collect unemployment.”

But the employee said morale remains low. Training teams have been hosting Google Hangouts from home to talk about the importance of social distancing, the worker said, “while we are all covered up wearing masks in the filthy warehouse.”

“It’s so busy that we’re all struggling to hit our quotas,” the worker said. “It feels like I’m nothing but a number, like nobody cares whether I live or die.”