Health insurer Humana Inc posted a higher-than-expected quarterly profit as an improved performance in its Medicare plans for the elderly offset a decline in earnings from its business serving employers.

Shares of Humana, which also backed its 2009 profit forecast, rose nearly 5 percent in premarket trading on Monday.

Humana shares have underperformed rivals this year, amid concerns that the large provider of Medicare plans would be hit hard by U.S. government efforts to rein in costs from the healthcare program for the elderly.

Net income rose 34 percent to $281.8 million, or $1.67 per share, from $209.9 million, or $1.24 per share, a year earlier.

Analysts on average had expected $1.64 per share, according to Reuters Estimates.

Revenue rose 7 percent to $7.90 billion. Analysts expected $7.75 billion.

Performance in the government segment was strong yet again, while the much smaller commercial segment showed slight weakness from the recession, Wells Fargo analyst Matt Perry said in a research note.

Membership in the company's Medicare Advantage plans stood at nearly 1.5 million, up 12 percent from a year earlier and 4 percent from the end of last year.

The company spent 83.3 percent of its premiums on medical costs, compared with 85 percent a year earlier, when it was plagued by higher prescription drug costs in its Medicare plans.

Earnings in Humana's commercial segment fell 53 percent to $35.3 million, hurt by lower investment income. Commercial membership fell 3 percent to 3.45 million.

Humana expects a decline of 175,000 to 195,000 commercial members by year end, steeper than the 150,000 to 175,000 it forecast in April.

Health insurers have seen their employer-based enrollment pressured by layoffs stemming from the weak economy.

The company continues to expect full-year earnings of $6.10 to $6.20 per share, excluding special items. Analysts expect $6.09.

Humana said it had filed a protest against its loss last month of a U.S. Department of Defense health program contract.

Humana shares were up 4.9 percent at $34.45 in trading before the market opened. Through Friday, they had fallen some 12 percent this year, compared with a nearly 13 percent rise for the S&P Managed Health Care index <.GSPHMO> of large health insurers.

(Reporting by Lewis Krauskopf; Editing by Lisa Von Ahn)