Health insurer Humana Inc posted a 34 percent rise in second-quarter profit on Monday, topping estimates, as an improved performance in its Medicare plans for the elderly offset a decline in earnings from its commercial business serving employers.

Net income at the large provider of Medicare plans rose 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.

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 expects 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.

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