January 2/Washington/Reuters -- A deal approved by the U.S. Congress to avoid the automatic tax hikes and spending cuts known as the "fiscal cliff" also includes measures to avert the "dairy cliff" -- a steep increase in milk prices.

The tax agreement contains a nine-month fix for expiring farm subsidy programs by extending a 2008 farm law. That gives lawmakers time to come up with a new five-year replacement.

Without the fix, the farm law would have expired and dairy subsidies would have reverted to 1949 levels, meaning retail milk prices could have doubled to about $7 a gallon in coming weeks or months.

Lawmakers have so far failed to finalize a new $500 billion, five-year farm bill to replace the 2008 legislation, which authorizes spending on food stamps and crop subsidies.

They had agreed to eliminate $5 billion in annual direct payments to grain, cotton and soybean growers, subsidies deemed wasteful at a time of high prices and record farm income.

The extension of the 2008 farm law is designed to buy time for Congress to complete a new farm bill and still allow for another round of direct payments.

However, three dozen programs in the law have no money left, including disaster relief and biofuel development as well as a soil conservation program and some rural economic development and agricultural research programs.

As the year-end deadline drew closer, farm-state lawmakers had drafted a one-year fix that would have included disaster relief money for livestock producers hurt by drought.

It also would have created a dairy subsidy program to compensate farmers when feed costs are high and milk prices are low.

That was nixed by Senate Republican Leader Mitch McConnell during the final hours of fiscal cliff talks, a Senate aide said.

Dairy processors said the proposed new dairy plan would have interfered too much with the market.