Cars.com lost money in the first quarter as the novel coronavirus took a financial toll on the company and its dealership customers, but the company still generated a gain in adjusted net income and its shares skyrocketed.

The Chicago vehicle listings company posted a net loss of $787 million in the quarter ended March 31, up from a net loss of $9 million in the same period a year ago.

Cars.com attributed the loss to a virus-related noncash goodwill and intangible asset impairment charge of $905.9 million recorded in the first quarter.

Revenue dipped 4 percent to $148.1 million, mainly resulting from declines in dealership customers and average revenue per dealership compared with the prior year, the company said. Cars.com said it achieved its second straight quarter of dealership customer growth in the first quarter, reporting 18,938 customers as of March 31, up 104 from the fourth quarter of 2019.

Cars.com said its adjusted net income for the first quarter rose 5 percent to $21.8 million. The adjusted figure largely excludes the impairment charge related to COVID-19, the respiratory illness caused by the coronavirus, along with several other one-time charges.

The news sent Cars.com stock soaring, rising 44 percent to $6.52 in midday trading in New York.

Website traffic gains in the quarter and efforts to add more dealership customers is “evidence that our business strategy had strong momentum pre-COVID-19 and will continue to deliver benefits to customers and consumers when we emerge from this crisis,” Cars.com CEO Alex Vetter said in a statement.

“While the impact of COVID-19 is severe, we know our digital solutions are part of the antidote for our industry, and we worked in partnership with dealers to initiate efforts to get car sales classified as essential services, selling safely through digital platforms,” Vetter said.

Before the pandemic reached the U.S., Cars.com said, it anticipated it would finish the year with revenue growth. But states began to close nonessential businesses in March to limit transmission of the coronavirus, forcing dealerships in some places to shift from physical to digital vehicle sales. Sales fell in the first quarter as buyers largely stayed home.

In addition, monthly average revenue per dealership fell 6 percent to $2,092 from the prior-year quarter as dealerships canceled upsells and the company offered discounts on products in late March, Cars.com reported.

Some discounts have been extended into June. The company also said it trimmed spending to offset at least half of the revenue hit from COVID-19.

Cars.com furloughed roughly 250 employees April 1 and said in a regulatory filing Tuesday that it permanently cut close to 170 employees as of May 1. The job losses are estimated to require between $4 million and $4.75 million in pretax costs for employee severance in the second quarter, the company said.

The company’s second-quarter financial results also are expected to be affected by the economic impact of the coronavirus pandemic, including discounted fees, interim CFO Jandy Tomy said. Cars.com drew down $165 million from its revolving credit facility to boost liquidity, and the company had $187 million in cash available as of March 31.

“As the COVID-19 restrictions lift and economic conditions strengthen, we remain confident that [Cars.com] is well-positioned to continue our momentum towards achieving market leadership over time,” Tomy said in a statement.

Cars.com suspended its 2020 fiscal-year guidance in March, citing uncertainty about the extent of the COVID-19 impact.

The company’s Dealer Inspire unit, which includes dealership websites and other technology products, was a bright spot in the quarter, with 22 percent growth in first-quarter revenue compared with a year ago. Dealer Inspire also is on track to release more than 800 General Motors dealership websites by the end of this year, the company said. GM chose it as one of four preferred website vendors starting this year.