Shares of the industry bellwether rose nearly 10% in early trading, boosting rivals Tenet Healthcare, up 8.7%, and Community Health Systems, which gained 4.5%.

The company on Wednesday also recorded an $822 million government stimulus income related to the Coronavirus Aid, Relief, and Economic Security (CARES) Act.

HCA's quarterly results were much stronger than feared across the board, despite the company recording a lower CARES benefit than modeled, Stephens analyst Scott Fidel said.

The largest for-profit U.S. hospital operator said patient volumes across most service lines gradually improved in May and June from April lows, as states began to reopen and allow for non-emergent procedures.

Earlier this month, health insurer UnitedHealth Group Inc and medical device maker Abbott Laboratories Inc also confirmed that deferred elective care rebounded in May and had approached pre-crisis levels by June end.

HCA's adjusted earnings per share was $1.50, excluding government stimulus income of $1.73, according to IBES data from Refinitiv. Analysts on average were expecting a loss of 39 cents.

Revenue per same-facility equivalent admission, a measure of sales per patient who stays in the hospital overnight and those treated on an outpatients basis, rose 10% in the quarter, while same facility equivalent admissions declined 20.1%.

Inpatient and outpatient surgeries fell 15.7% and 32.6%, respectively, on a same-facility basis. Sales dropped 12.2% to $11.07 billion in the second quarter ended June 30, beating estimates of $10.09 billion.

By Mrinalika Roy and Manojna Maddipatla