Allstate Corp. posted a bigger first-quarter loss than analysts expected as higher premiums failed to offset rising auto costs and soaring catastrophe losses.

The company reported a $342 million loss on an adjusted basis for the period, compared to profit of $730 million a year earlier, it said Wednesday in a statement. While rate increases on auto and home insurance helped lift property-liability earned premiums by $1.1 billion, that failed to avert an underwriting loss of about the same magnitude.

“Auto loss costs, however, continued to increase rapidly and essentially offset higher premiums, which combined with exceptionally high first-quarter catastrophe losses resulted in an underwriting loss of $1.0 billion,” said Chief Executive Officer Tom Wilson.

Catastrophe losses rose to $1.7 billion from $462 million the prior period, it said. The shares were little changed in late trading in New York.

Like its rivals, Allstate is battling elevated costs of used vehicles, replacement parts and labor for car repairs. It’s taken steps to stem the bleeding, including by passing on higher costs to customers and expense reductions, but insurers haven’t been able to reap those rewards all at once because they typically kick in only after customers renew policies.

Allstate also continued to make progress implementing its auto insurance profit improvement plan, according to the statement.

“The combination of an aggressive strategy and Allstate’s brand, customer base and financial strength will lead to long-term growth,” Wilson said.