Allstate Corp.'s (ALL) second-quarter earnings soared as the insurer's investment results benefited from the rally on Wall Street.

But shares fell 3.5% after-hours to $27.50 as operating earnings were far below expectations amid a jump in claims costs. The shares have doubled in the past five months but remain down more than 40% from their 52-week high last September.

"Catastrophes are random," and were the main factor that caused Allstate to miss analyst estimates, said Thomas Wilson, Allstate's chief executive, in an interview Wednesday. Catastrophe losses from events other than hurricanes have driven up losses for the last six quarters, Wilson said, and pushed Allstate to record second-quarter catastrophe losses of $818 million.

Allstate, harder hit that most insurers by losses on mortgage-related securities, has seen conditions improve in the second quarter as equity markets rallied, perhaps easing worries that the company would have to raise capital. The company, which declined to take a capital injection from the U.S. Treasury, ousted its life-insurance chief as it scaled back those operations and halved its dividend earlier this year.

Wilson said hedges the company put in place to protect it against rising interest rates helped increase profits during the quarter.

The nation's largest publicly held personal-lines insurer posted a second-quarter profit of $389 million, or 72 cents a share, compared with year-earlier earnings of $25 million, or 5 cents a share. Operating earnings, which exclude investment gains and losses, fell to 55 cents a share from $1.24.

Revenue jumped 15% to $8.49 billion.

Analysts surveyed by Thomson Reuters expected operating earnings of $1.12 a share on revenue of $8.2 billion.

The property and liability segment's combined ratio, the percentage of premiums paid out on losses and expenses, increased to 100% from 94.4%. Excluding catastrophes and prior-year reserve re-estimates, the ratio climbed to 87.2% from 84.1%. Overall catastrophe losses rose 17%, while premiums written dropped 2.8%.

Allstate has focused on improving customer loyalty in recent quarters, and Wilson said it is making progress, though results in numbers of policies in place lag behind improving customer loyalty figures.

Allstate brand standard auto policies in force dropped 1.6%, while homeowner policies in force fell 4.2%.

Allstate's investment portfolio rose $2.6 billion during the quarter to $96.5 billion.

The company noted its restructuring of Allstate Financial remains on track to hit $90 million in annual savings by 2011, having already reached a $65 million run rate in expense cuts.

-By Lavonne Kuykendall and Jay Miller, Dow Jones Newswires; (312) 750 4141; lavonne.kuykendall@dowjones.com