Allstate Corp , the largest publicly traded U.S. home and auto insurer, swung to a profit on Wednesday from a year ago loss, helped by lower catastrophe and investment losses.

Net income was $221 million, or 41 cents a share, compared with a net loss of $923 million, or $1.70 a diluted share, in the year-ago quarter.

A year ago, Allstate's results were hurt by both sizable

investment losses and $1.8 billion in catastrophe losses.

Excluding investment gains and losses, Allstate's third- quarter operating profit was $538 million, or 99 cents a share, compared with a loss of $190 million, or 35 cents a share in the same quarter of 2008.

On that basis, analysts on average expected Allstate to have a profit of $1.01 a share, according to Thomson Reuters I/B/E/S.

The shares of the Northbrook, Illinois-based insurer fell 0.4 percent, or 12 cents, in the regular session on Wednesday to $29.62 a share.

(Reporting by Lilla Zuill; editing by Andre Grenon)