Temporary store closures and stay-at-home orders sent CarMax Inc.’s sales and profits down by double digits in its fiscal first quarter, which ended May 31.

But business has been recovering and company shares are rising.

The country’s largest used-vehicle retailer had its fiscal quarter coincide with the brunt of the coronavirus pandemic, which prompted many local and state governments to implement measures that kept stores from operating and customers from shopping.

More than 80 percent of the days in the quarter were negatively impacted by the pandemic, including a mix of store closures and limited operations, CarMax said in an earnings release Friday.

Net earnings dropped 98 percent to $5 million in the quarter while net sales and operating revenues fell 40 percent to $3.23 billion. The used-vehicle retailer’s gross profit decreased 52 percent to $354.2 million.

Used-vehicle gross profit was down 47 percent, impacted by a decline of $278 in per-unit, used-vehicle gross profit to $1,937. Gross profit per vehicle was hit by pricing adjustments CarMax made to better align inventory levels with sales.

Total used-vehicle sales fell 40 percent to 135,028. On a same-store basis, used-vehicle sales were down 42 percent.

Sales have progressively improved from a trough in early April, CarMax said. In the first two weeks of June, same-store, used-vehicle sales were within 10 percent of last year’s totals.

Shares of CarMax closed Friday’s trading down 6.2 percent to $91.87. The share price has more than doubled since late March.

CarMax said it grew its liquidity position during the period by selling through inventory and quickly aligning costs to lower sales volumes.

“We accomplished a lot this quarter, despite the challenges the pandemic posed,” CEO Bill Nash said in the release, adding that the company was able to continue to roll out aspects of its omnichannel retail initiative, such as curbside pickup.

In terms of overall business, Nash said that signs were trending positive in late May and June, with used-vehicle sales gaining momentum and Web traffic up year over year.

CarMax has called back 85 percent of the 15,500 employees it furloughed in April, Nash said. The company has spent about $30 million supporting the furloughed personnel through 14 days of pay continuity upon store closure and quarantine, as well continuing medical benefits.

CarMax opened four new stores in the quarter, all of which were in markets where it already operated. The company initially put new-store openings on hold. Stores in Tampa, Fla., and Philadelphia stores were completed before that decision, and ones in New Orleans and Los Angeles were “substantially complete,” so it opened them in May, the company said.