Nike has reported an unexpected quarterly loss - its first in more than two years - hurt by closures of department and retail stores due to lockdowns spurred by the Covid-19 pandemic. 

The wholesale business, through which Nike sells merchandise to other retailers, came to a halt amid the health crisis. 

That led to a 50% fall in shipments, increased inventory and higher costs due to order cancellations. 

As a result, gross margin fell 820 basis points in the fourth quarter, when company-owned stores and other retailers were closed for nearly eight weeks. 

However, Nike's investments in its digital platform over the years helped it record a 75% rise in online sales, as many consumers shopped for activewear and runners from the comfort of their homes. 

Chief executive John Donahoe told analysts the company is now accelerating focus on its online presence, and expects its overall business to reach 50% digital penetration. Online sales accounted for 30% of total revenue in the quarter. 

"Covid-19 has shown that our strategy is sound," Donahoe said. 

In China, where the virus was first detected, all of Nike's stores are now open. Revenue fell 3% in the Greater China region, while they plunged nearly 47% in North America. 

Analysts said the Nike brand is still strong and China sales number is an indicator of what to expect in western markets and the US as things normalise. They said the company is not financially distressed and it does not have the problems of other companies in retail. 

Nike's net loss came in at 51 cents per share and revenue fell 38% to $6.31 billion. 

Wall Street was expecting a profit of 7 cents per share and revenue of $7.32 billion, according to IBES data from Refinitiv.