WASHINGTON — Congress gave final approval Tuesday to a sweeping overhaul of federal farm and nutrition policies, ending nearly four years of negotiations between Democrats and Republicans.

President Obama is expected to sign the bill after Tuesday’s 68 to 32 Senate vote.

The bill ends billions of dollars in direct subsidy payments to some farmers – replacing them with new crop insurance programs – but maintains controversial subsidies for some major crops. It also cuts about $8 billion in funding for food stamps.

Sen. Susan Collins, R-Maine, opposed the bill while and Angus King, I-Maine, supported it.

King said Maine’s potato, blueberry and apple farmers will benefit from the “specialty crop” grants. He also praised the inclusion of funding for the Farmers Market Promotion Program, for local foods initiatives and for programs that help younger farmers get started. King expressed disappointment, however, about the cut in food stamps.

“Agriculture is… a cornerstone of Maine’s economy, and while this final piece of legislation is far from perfect, it significantly reforms current policy to support many of the diverse needs and priorities of farming, conservation, and forestry industries within Maine and across America,” King said in a statement.

Collins supported the Senate version of the bill but voted against the final bill because of last-minute changes pertaining to the dairy industry. The farm bill institutes a voluntary insurance program that would help cover losses when milk prices plummet, feed prices skyrocket or both.

Negotiators removed language authored by Collins that required the U.S. Department of Agriculture to hold public hearings on comprehensive reforms of the dairy support system.

“While this bill does contain some provisions that I support, including funding for agricultural research, and conservation and forestry programs, I am deeply disappointed that the final version falls far short of providing desperately needed support for Maine’s small dairy farmers,” Collins said in a statement.

Washington Bureau Chief Kevin Miller contributed to this story.