Congress gave final approval Tuesday to a sweeping overhaul of a broad range of federal farm and nutrition policies affecting what farmers grow, how food is packaged and sold and how the government helps poor people pay for their groceries.

The Senate voted 68 to 32 Tuesday afternoon to approve a new, five-year farm bill that the House passed last week. The measure heads next to President Obama, who is expected to sign it in the coming days.

After nearly four years of haggling between Democrats and Republicans, the $956.4 billion package was unveiled last week and sailed through Congress in just a matter of days.

Senate Agriculture Committee Chairman Debbie Stabenow (D-Mich.) described the agreement Tuesday as "a major bipartisan jobs bill that makes sure that 16 million people who work in agriculture... have the support that they need."

The 959-page bill authorizes the end of billions of dollars in direct subsidy payments to the nation’s farmers. In their place, farmers will be able to take advantage of a new crop insurance program. The agreement also saves billions by consolidating government conservation programs and cuts about $8 billion in funding for food stamps by tweaking eligibility rules. The bill is supposed to cut roughly $16 billion in government spending over the next decade, according to government estimates.

The bill includes changes to complex programs involving environmental regulations on farms, aid to dairy and sheep farmers, and what kind of food the Agriculture Department should buy to replenish the nation’s food banks. But most of the political attention has focused on food stamps, formally known as the Supplemental Nutrition Assistance Program, or SNAP.

Negotiations over a new bill nearly collapsed in July when House GOP leaders, bending to the demands of tea party members, split apart the farm bill and held separate votes on measures setting most agricultural policy and another that would have slashed $40 billion in SNAP money by dramatically rewriting eligibility rules.

Ultimately, House and Senate negotiators agreed to cut about $8 billion – or 1 percent of the program’s budget -- by closing a loophole that several states and the District of Columbia have used to boost SNAP payments to low-income households. That change will reduce benefits for about 850,000 households nationwide, according to estimates by the Congressional Budget Office. Supporters say the cuts will come by implementing safeguards designed to reduce waste, fraud and abuse in the program.

A bloc of liberal lawmakers voted against the legislation in opposition to the food stamp cuts, while some conservatives voted against the agreement because it failed to more boldly cut SNAP funding.

RELATED:

The Fix: What's in the farm bill?

Graphic: Americans on food stamps