Molina Healthcare Inc. was profitable in the second quarter, as the Medicaid coverage provider added customers and improved its performance in Texas.

The Long Beach, Calif., company said Thursday after markets closed that it earned $24.6 million, or 53 cents per share, in the three months that ended June 30. That compares to a loss of $37.3 million, or 80 cents per share in last year's quarter, when the company struggled with customer claims that exceeded its estimates, particularly in Texas.

Earnings from continuing operations totaled 34 cents per share in the most recent quarter, and revenue climbed 8.6 percent to $1.61 billion.

Analysts expected, on average, earnings of 31 cents per share on $1.61 billion in revenue, according to FactSet.

"It's hard to complain about Molina's second quarter," Citi analyst Carl McDonald said in a research note. He added that the company's 2013 forecast will remain the same even though it now incorporates $10 million to $15 million in planned investments that weren't previously factored into the outlook.

Molina said it still expects 2013 earnings from continuing operations to total $1.55 per share.

Analysts forecast $1.60 per share, on average.

Molina said its premium revenue climbed 8 percent in the quarter mainly due to membership growth in Washington and Wisconsin and rate increases in Texas and also Washington. It also said its medical care ratio —essentially the percentage of premiums collected that it spends on medical care — fell for seven of its nine health plans.

Medical care costs, by far its largest expense, also fell 1.7 percent to $1.29 billion.

Molina shares closed at $39.95 on Thursday, and that price has climbed more than 47 percent so far this year.

McDonald said the stock isn't nearly as attractive as it was seven months ago due in part to that gain and the fact that it could face volatility next year as it expands enrollment in the state and federally funded Medicaid program that covers the poor and disabled people.

New Medicaid customers can drive up expenses for an insurer because they often come with a pent-up demand for care.