A bill that would overhaul the nation's food-safety laws for the first time since the Great Depression came roaring back to life Sunday as Senate Democrats struck a deal with Republicans that helped overcome a technical mistake made three weeks ago and a filibuster threat that seemed likely to scuttle the legislation.

After a weekend of negotiations, tense strategy sessions and several premature predictions about the bill's demise, Senate Majority Leader Harry M. Reid (D-Nev.) reached a deal with Minority Leader Mitch McConnell (R-Ky.) that the GOP would not filibuster.

Without notice and in a matter of minutes Sunday evening, the Senate approved the bill by unanimous consent, sending it to the House, where passage is expected. President Obama has said he would sign the legislation, which would give the government far-reaching authority to set and enforce safety standards for farmers and food processors.

It was a last-minute change for the legislation, which seemed all but dead Sunday afternoon.

"This reaffirmed my faith in democracy," said Jean Halloran, director of food policy initiatives at Consumers Union. "We were getting ready for a last-ditch effort . . . and they just went ahead an passed it, like they should have. . . . There's some hope now that the government will do a better job of protecting people" from tainted food.

The legislation would affect all whole and processed foods except meat, poultry and some egg products, which are regulated by the U.S. Department of Agriculture.

Sen. Tom Harkin (D-Iowa), a main sponsor of the bill, called Sunday's vote a "critical victory" that would "give Americans one of the best holiday gifts they can receive this year - the assurance the foods they are eating are safer."

The measure had support from an eclectic array of groups across the political spectrum from the Chamber of Commerce to U.S. PIRG and was pushed by a coalition of food-safety groups that lobbied for two years. It passed the House more than year ago with strong bipartisan support. It cleared the Senate three weeks ago by a vote of 73 to 25, overcoming a filibuster threat from Sen. Tom Coburn (R-Okla.).

But the day after the Senate vote, House leaders flagged a problem - the Senate version appeared to violate a constitutional provision that requires new taxes to originate in the House rather than the Senate.

The section in question would have imposed fees on importers, farmers and food processors whose food is recalled because of contamination. The mistake essentially nullified the Senate vote.

House Democrats tried to rescue the food-safety language by attaching it to a continuing resolution to fund the federal government, which the lower chamber passed Dec. 8. Reid also put the food safety language - minus the unconstitutional provision calling for fees - in an omnibus bill to fund the government, but that bill died Thursday after Republicans objected to earmarks in the legislation.

That left Reid with few options and dwindling time.

Late Sunday, Senate Democrats were weighing whether to attach the food safety language to one of a handful of measures expected to be brought to the Senate floor in the few remaining days before the Christmas recess.

But Coburn, who tried several times to kill the legislation, promised to filibuster any measure that includes food safety, a maneuver that would cost Democrats precious floor time in the waning days of the lame-duck session. John Hart, a spokesman for Coburn, said Sunday night that he did not know why his boss relented.

Unlike the current system, which relies on government inspectors catching contamination, the new measure would require manufacturers and farmers to come up with strategies to prevent contamination and then continually test to make sure they work.

It also would give the Food and Drug Administration the authority to recall food; now, it must rely on food companies to voluntarily pull products off the shelves. And, the bill would give the FDA access to internal records at farms and food-production facilities.

The bill would require importers to verify that products grown and processed overseas meet U.S. safety standards. One in six Americans become ill from tainted food each year, and 3,000 die, according to government figures. Businesses spend billions of dollars as a result of lost sales, recalls and legal expenses triggered by the problem.

The bill is expected to cost $1.4 billion over the next four years, including the expense of hiring 2,000 new FDA inspectors.