About 30 companies sued over making and selling contaminated pet food that may have led to the deaths of thousands of dogs and cats have agreed to pay $24 million to pet owners in the United States and Canada.

The settlement is detailed in papers filed late Thursday in U.S. District Court in Camden.

"The settlement attempts to reimburse pet owners for all of their economic damages," said Russell Paul, a lawyer for plaintiffs in the lawsuit.

If approved by a judge, the deal will cover nearly all documented expenses incurred by people directly related to the illness or death of a pet linked to the food, which was at the center of the biggest-ever U.S. pet food recall in 2007.

Streetsville, Ontario-based Menu Foods Income Fund, which makes dog and cat food under about 90 brand names, and other firms that make or sell pet food announced on April 1 that they were settling lawsuits with pet owners.

The pet food was discovered to contain wheat gluten imported from China that was contaminated with melamine, a chemical used to make plastics.

Though Menu was the first company to issue recalls, four other companies eventually recalled pet foods, too.

Nearly 300 people filed lawsuits in state and federal courts against the companies. They and perhaps thousands of other pet owners would be eligible for payments under the deal.

Additionally, some of the companies have already paid out more than $8 million to people whose pets were sickened or killed after eating the contaminated food.

Under the terms of the deal announced Thursday, pet owners can be reimbursed for all reasonable expenditures — including veterinarian bills and burial or cremation costs. Or pet owners can ask for fair market value of their deceased pets, if that is higher than the costs incurred. Owners who do not have documentation of their expenses can get up to $900 each. All claims are subject to a review.

The companies say they will donate any money left in the fund after claims are paid out to animal welfare charities.

The settlement details were originally to have been filed in court about two weeks ago, but it took longer than expected to hash out the deal, partly because it had to be made to conform with both U.S. and Canadian law.

A court hearing on the settlement is scheduled for May 30.