WASHINGTON (AP) _ The Internal Revenue Service has reversed itself and restored a tax credit worth thousands of dollars a year to low-income dairy farmers.

The IRS had been denying the credit because of a provision in the 1996 welfare overhaul law that lawmakers say they didn't intend to apply to farmers.

The IRS said the law required sales of unproductive cattle to count against the earnings limit for the tax credit. An estimated one of every three dairy farmers was affected. The IRS notified lawmakers this week that it was changing that interpretation.

``This will be an enormous boost for a lot of farmers who were unfairly penalized,'' said Sen. Herb Kohl, D-Wis.

The decision is retroactive to 1996 and 1997, so that farmers can file amended returns for those years and claim the extra money, he said.

Tax experts say the credit provided low-income dairy farmers with $1,000 to $3,000 a year. Dairy farmers typically sell 30 percent of their herds each year.

The tax credit was designed to supplement the incomes of low-income families.

Efforts in Congress to restore the credit for farmers had failed.