That provision led the United Fresh Produce Association, a trade group, to announce recently that it would oppose the legislation since small food operations have been the source of some food recalls in recent years.

Image Eggs and other foods would be subject to greater oversight. Credit... Robert F. Bukaty/Associated Press

But Randy Napier of Medina, Ohio, said the Senate bill was much needed. Mr. Napier’s 80-year-old mother, Nellie Napier, died in January 2009 after the nursing home where she lived continued to give her contaminated peanut butter even after she got sick. “I am appalled at what I have found out since my mother’s death about how poorly food is regulated and how these companies cut corners to save money,” Mr. Napier said.

The legislation greatly increases the number of inspections of food processing plants that the F.D.A. must conduct, with an emphasis on foods that are considered most high risk  although figuring out which those are is an uncertain science. Until recently, peanut butter would not have made the list.

Staunch opposition to the bill by Senator Tom Coburn, Republican of Oklahoma, forced months of delay and eventually required the Senate majority leader, Harry Reid of Nevada, to call a series of time-consuming procedural votes to end debate. Mr. Coburn offered his own version of the legislation. It eliminated many of the bill’s requirements because he said that more government rules would be deleterious and that the free market was working. That version was rejected.

Despite Mr. Coburn’s opposition, the bill is one of the few major pieces of bipartisan legislation to emerge from this Congress. Some Republican and Democratic Senate staff members  who in previous terms would have seen one another routinely  met for the first time during the food bill negotiations. The group bonded over snacks: Starburst candies from a staff member of Senator Michael B. Enzi, Republican of Wyoming, and jelly beans from a staff member of Senator Richard J. Durbin, Democrat of Illinois.

“This legislation means that parents who tell their kids to eat their spinach can be assured that it won’t make them sick,” said Senator Tom Harkin, Democrat of Iowa, who, as chairman of the Senate health committee, shepherded the legislation through months of negotiations.

Health advocates are hoping the legislation will rekindle the progress  now stalled  that the nation once enjoyed in reducing the tens of millions of food-contamination illnesses and thousands of deaths estimated to occur each year. In the case of toxic salmonella, infections may be creeping up, according to government figures.