Customers pumped up Rite Aid sales of sanitizers, wipes and liquor, helping the drugstore chain deliver a better-than-expected first-quarter performance.

Company shares started climbing early Thursday after Rite Aid said its fiscal first-quarter loss shrank to $63.5 million from $99.7 million in the previous year's quarter.

Sales from the front end, or the area outside the pharmacy of Rite Aid's established stores, jumped 16% in the quarter, excluding tobacco products. Those sales were helped by increased purchases of cleaning products as customers stocked up to fight the coronavirus pandemic.

But Rite Aid said the virus that causes COVID-19 also imposed added costs for safety measures and other expenses and led to a decline in some prescriptions. The company estimates that those expenses added up to a $30 million hit in the quarter.

Rite Aid's overall loss, adjusted for one-time gains and costs, totaled 4 cents per share. Revenue climbed 12% to $6.03 billion.

Analysts expected, on average, a loss of 38 cents per share on $5.61 billion in revenue, according to FactSet.

Camp Hill, Pennsylvania-based Rite Aid Corp. runs more than 2,400 retail pharmacies in 18 states.

Rite Aid's quarterly net loss improved mainly due to a "last-in-first-out," or LIFO, inventory credit of more than $12 million this year. That compares to a $7.5 million charge in the previous year's quarter. An income tax benefit and lower restructuring costs also helped.

Company shares rose 23% to $15.68 in midday trading Thursday while the broader market was flat.

The stock had slipped nearly 17% so far this year.