WASHINGTON — The US Congress gave final approval Tuesday to a sweeping food safety bill in the wake of mass recalls affecting items from tainted eggs to peanut butter, pistachios, spinach and milk.

The House of Representatives passed the measure by a 215-144 margin, days after the Senate okayed the bill, sending the legislation to President Barack Obama to sign into law.

"With recent outbreaks of food-borne illness from common foods such as spinach, tomatoes, peanut butter, and cookie dough, the urgency of addressing this challenge could not be greater," said House speaker Nancy Pelosi.

The bill strengthens the ability of the US Food and Drug Administration (FDA) to prevent outbreaks and fight them when they occur.

Preventable food-borne illness strikes some 76 million Americans each year, requiring 325,000 to be hospitalized, and 5,000 die from tainted food, according to Democratic senator Dick Durbin, the measure's lead author.

The legislation will give FDA more power for inspections, mandatory recall authority, and the technology to trace an outbreak back to its source, said Durbin, who warned, "Our vigilance must continue."

The vote came after a massive August recall of eggs after a salmonella outbreak that sickened some 1,700 people. Overall, more than half a billion eggs were recalled this year, the largest recall in the US industry's history.