Costco Wholesale topped Wall Street’s profit expectations during its first quarter amid continued high demand for food and supplies, even as the warehouse chain said pandemic-related costs remain elevated.

Its net sales rose 16.9% from the year-earlier quarter to $42.35 billion, while its e-commerce sales soared 86.4%. In a conference call with analysts, Chief Financial Officer Richard Galanti said that while strong categories for e-commerce ranged from housewares and pharmacy to TVs and other electronics, “total online grocery grew at a very strong rate in Q1, nearly 300%.”

Profit climbed to $2.62 a share in the period ended Nov. 22, the Issaquah-based company said Thursday in a statement. Analysts had expected $2.06 on average, according to estimates compiled by Bloomberg.

Costco has seen steady demand as consumers stock up on bulk food, along with electronics and goods for the home. Despite signs the pantry-loading trend may wane with a coronavirus vaccine, the pandemic has been a boon for large retailers and warehouse clubs, including Costco, that carry quarantine-friendly items such as shelf-stable canned goods and rice.

Sales from membership fees climbed 7.1% in the quarter. Because Costco releases net sales figures on a monthly basis, investors tend to look at this measure during quarterly reports as a performance gauge.

Costco said its U.S. sales were up 14.6% for the quarter, while sales in Canada rose 16.2% and other international sales increased 18.7%.

The company incurred $212 million in costs during the quarter related to higher wages during the pandemic. Costco said earlier this year it would pay employees an extra $2 an hour, and it has been incurring higher expenses related to e-commerce, too.

Costco shares climbed 27% this year through Thursday’s close, roughly double the gain of the S&P 500 Index.

Seattle Times staff contributed to this report.