A surge in food delivery sales helped Uber Technologies Inc. offset a first-ever decline of the ride-hailing business in a quarter upended by the coronavirus.

The San Francisco-based company has never turned a quarterly profit, but it inched closer to that goal in the quarter. The loss, excluding taxes, interest and other expenses, declined 30 per cent from a year ago, to US$612 million. That was better than an average of analysts estimates compiled by Bloomberg. But accounting for a writedown on investments and other costs, the net loss was much larger.

Homebound customers drove a 52-per-cent increase in food delivery gross bookings to US$4.68 billion in the first quarter. Gross bookings from rides, a measure of the total value of fares that’s closely watched by investors, dropped five per cent to US$10.9 billion. A year earlier, growth was more than 20 per cent.

“Along with with the surge in food delivery, we are encouraged by the early signs we are seeing in markets that are beginning to open back up,” Uber Chief Executive Dara Khosrowshahi said in a statement. “Our global footprint and highly variable cost structure remain an important advantage, as our expectation is that the rides recovery will vary by city and country.”

The problems last quarter for Uber’s rides business, and for most of the transportation industry, can be traced to the spread of the virus around the world. With the stock under pressure in the first quarter, Khosrowshahi sought to reassure investors on a conference call explaining the business would have a US$4 billion cash cushion in a worst-case scenario.

Uber is a major investor in Didi Chuxing, the largest ride-hailing operator in China, where the virus originated. By April, Uber withdrew its financial forecast for the year and said it would take a significant charge on investments, which totalled US$2.1 billion. That drove a quarterly net loss of US$2.94 billion, nearly triple the loss a year ago.

During the past week, Uber has embarked on a blitz of cost-cutting moves. Uber said it will end food delivery operations in seven countries and that its Middle East unit Careem will terminate 31 per cent of employees. On Wednesday, the company told employees it was cutting 14 per cent of staff and indicated that more cost reductions would be conveyed in the next two weeks. Uber said Thursday it will transfer its bicycle and scooter business to Lime and invest more capital in the startup.

Even as Uber is hustling to cut costs, a new threat has emerged. Its home state, California, sued Uber and its peer, Lyft Inc., this week alleging that they are violating a law enabling their drivers to reap employee benefits. If they lose the case, the companies face substantial new costs that will alter their business models in California and could embolden other governments to take similar actions.