Community Health Systems Inc (CYH.N), the second-largest U.S. hospital operator, beat analysts' second-quarter earnings expectations on higher operating revenue, sending its shares up more than 6 percent in after-hours trading.

The company said efficient expense management helped offset ongoing challenges from the weak economy. Hospitals generally have seen patient admissions decline as Americans who lost their jobs and health insurance delay seeking medical care.

Weak second-quarter results last week from HCA Holdings Inc (HCA.N) pressured stocks in the sector as the No. 1 hospital chain said fewer complex surgeries were performed at its facilities.

Community Health said on Thursday its second-quarter net income declined to $35.4 million, or 39 cents a share, from $70.1 million, or 74 cents a share, a year ago, due to impairment charges for two hospitals that are for sale.

Community Health said earnings from continuing operations were 81 cents a share.

On that basis, analysts on average had expected 78 cents a share, according to Thomson Reuters I/B/E/S.

Net operating revenue rose 11.5 percent to $3.4 billion in the second quarter.

Total admissions edged up 0.6 percent in the quarter, compared with a year ago, but same-store admissions at hospitals operated by the company for more than a year declined 5.6 percent.

Adjusted earnings before interest, tax, depreciation and amortization, which exclude discontinued operations, were $462.3 million, up from $441.7 million in the year-ago period.

Shares of Community Health were up 6.6 percent in after-hours trading from a close of $24.87 Thursday on the New York Stock Exchange.