A Pennsylvania lawsuit claims State Farm Insurance put together a sweetheart deal with the attorneys general of 49 states after discovering that it had failed to obtain "salvage" titles for cars it had declared to be total wrecks.

The company is paying $40 million to about 30,000 motorists who bought cars that had been totaled, thinking they were low-mileage cream puffs. The amounts paid to individual consumers range from a few hundred dollars to $20,000, depending on the value of the car.

The lead plaintiff in the suit filed in Allegheny County court is Robert G. Beaves, 51, of Sewickley. He said he is being offered up to $2,700 for a Honda Civic he bought two and one-half years ago for more than $14,000.

Beaves said he never would have bought the car had he known it was salvaged. He said Pennsylvania is now demanding that he turn in his clean title to the car and get a salvage title. That will reduce the car's resale value drastically.

Further, Beaves said, if his vehicle is damaged in an accident, he will be compensated based on its value as a salvaged vehicle. He will also lose his extended warranty.

State Farm has said that when it discovered it had not been properly retitling totaled vehicled, it approached an assistant to Attorney General Tom Miller of Iowa to see if a settlement could be worked out. Miller's office has defended the settlement because consumers don't have to sue.

State Farm has not revealed details of how the error occurred but said it was discovered during an internal review.

Beaves' lawsuit claims State Farm had a financial motive for allowing salvage cars to enter the market without appropriate titles and delayed notifying car buyers in hopes of reducing its payout.

Beaves' suit seeks damages for the cost of the car, punitive damages and attorneys fees.