By Khadeeja Safdar and Kimberly Chin

Nike Inc. said sales fell 38% in the latest quarter, as mass closures of physical stores amid the coronavirus pandemic overshadowed surging demand online.

Chief Executive John Donahoe said Nike has reopened most of its stores globally and benefited from its digital apps and online sales, which grew 75% and cushioned the overall decline. But he acknowledged the impact of the virus on the business, and the company said it wouldn't provide an outlook because of continuing uncertainty.

The rapidly spreading coronavirus prompted Nike and dozens of other retailers to close their stores, governments to limit travel and many shoppers to stay home. Nike continued to pay its workers during the closure and doubled down on digital sales while consumers were confined to their homes. Though states are gradually easing lockdown measures, there have been flare-ups of new cases that have interrupted reopening plans in parts of the country.

Nike said roughly 85% of its stores were open in North America. Roughly 90% of stores were open in its Europe, Middle East and Asia segment, and about 65% of stores were open in the Asia, Pacific and Latin America regions.

Mr. Donahoe said the company will continue to focus on expanding its digital business and on plans to open between 150 and 200 small-format stores with merchandise that reflects the preferences of customers in the local area.

Even with the boost from online shoppers, sales in the latest quarter fell to $6.31 billion from the year-earlier quarter. Shares of Nike fell nearly 4% in after-hours trading.

Total sales for North America were $2.23 billion, down 46% from a year earlier. Nike's sales in Greater China slipped 3% to $1.6 billion. Nearly all of its stores in Greater China had reopened as of mid-May.

The Beaverton, Ore.-based company swung to a loss of $790 million, or 51 cents a share, from a profit of $989 million, or 62 cents a share, a year earlier. The loss, which surprised analysts, was attributed to lower revenue and reduced gross margins that fell because of higher product costs, increased inventory reserves and adverse effects on supply chain costs.

The company cut its expenses by 6% from a year ago.

Write to Khadeeja Safdar at khadeeja.safdar@wsj.com and Kimberly Chin at kimberly.chin@wsj.com