HCA Holdings (HCA - Get Report) has acquired five Texas hospitals from rivals Tenet Healthcare (THC - Get Report) and  Community Health Systems (CYH - Get Report) , the healthcare titan reported Tuesday.

Shares of  Community Health and Tenet jumped after the sales were announced. Community's shares were up nearly 21% or $1.80 to $10.42 through late morning trading. Tenet shares were up almost 24% or $3.65 to $19.00.

News of the deals came as all three companies reported first quarter earnings. Both Tenet and Community, whose operations have struggled, reported results that beat estimates.

Tenet is selling three Houston hospitals to HCA for $725 million, which will add to the 10 hospitals, eight surgery centers, two freestanding emergency rooms and 10 imaging centers HCA already has in the city. The agreement includes 423-bed Houston Northwest Medical Center, 181-bed Cypress Fairbanks Medical Center Hospital and 444-bed Park Plaza Hospital.

Community Health Systems is selling two facilities for an undisclosed amount, although Jefferies analyst Brian Tanquilut estimated that the purchase is worth between $250 million and $300 million.

The facilities are Tomball Regional Medical Center, a 350-bed hospital in the Houston area, and South Texas Regional Medical Center, a 67-bed hospital in Jourdanton, Texas, south of San Antonio. HCA has a strong presence in both areas. South Texas Regional Medical Center will be acquired through HCA's partnership with Methodist Healthcare Ministries.

"Tomball Regional and South Texas Regional will fit in nicely with our provider systems in both Houston and San Antonio," said Sam Hazen, HCA's COO. "The addition of these two hospitals will enhance our ability to meet the medical needs in both areas and improve patient access to our provider networks."

In San Antonio, HCA co-owns Methodist Healthcare System of San Antonio Ltd., in a partnership with Methodist Healthcare Ministries. It includes eight hospitals and two freestanding ERs. In Houston, HCA has a comprehensive network of 10 hospitals, eight surgery centers, and two freestanding ERs.

Both transactions, which are subject to regulatory approval, are expected to close by the third quarter.

HCA currently operates 171 hospitals, 119 freestanding surgery centers, and numerous other outpatient centers in 20 states and the United Kingdom.

Community Health also announced a separate deal to sell its 88-bed Lake Area Medical Center in Lake Charles, La. and its associated assets to subsidiaries of CHRISTUS Health. The transaction is expected to close in the second quarter of this year, subject to regulatory approvals. The hospital in this transaction is one of the planned hospital divestitures previously discussed.

Community which has an ongoing programming of weeding out underperforming hospitals also closed on the previously announced sale of 10 other hospitals Monday.

Tenet reported a net loss from continuing operations of $52 million in the first quarter of 2017, a $3 million improvement when compared to a $55 million net loss from continuing operations in the first quarter of 2016. Adjusted Ebitda was $527 million in the first quarter of 2017, down from $617 million in the first quarter of 2016.

"We achieved strong financial results, delivering adjusted Ebitda that was at the high end of our Outlook range," said Trevor Fetter, Tenet Chairman and CEO.

Tenet also announced a new agreement with Humana that will allow all Tenet physicians to be phased back into Humana's network by October. It also completed the sale of the majority of its home health and hospice businesses, sold its managed Medicaid plan in Arizona and increased its ownership of ambulatory surgery center operator United Surgical Partners International to 80%.

HCA announced that first quarter revenues increased 3.5% to $10.623 billion as same facility equivalent admissions increased 1.6%, while same facility admissions increased 1.2% and same facility revenue per equivalent admission increased 1.7%. Net income attributable to HCA Holdings totaled $659 million, or $1.74 per diluted share, compared to $694 million, or $1.69 per diluted share, in the first quarter of 2016.

Community Health reported net operating revenue for the three months ended March 31, 2017, totaled $4.486 billion, a 10.3% decrease, compared with $4.999 billion for the same period in 2016. Loss from continuing operations was $198 million, or $1.78 per share diluted, for the three months ended March 31, 2017, compared with income from continuing operations of $12 million, or $0.11 per share diluted, for the same period in 2016.

Commenting on the results, Wayne T. Smith, Community Health chairman and CEO, said, "We continue to make good progress on our strategic and operational initiatives, and we are pleased to see these efforts reflected in our first quarter results." The company will continue its performance improvements aimed at yielding additional efficiencies in 2017.

He added: "We are making progress with our portfolio rationalization strategy as we work to create a stronger, more sustainable company for the future and further reduce our debt."