(Photo: Jeremy Brooks / Flickr)The Food and Drug Administration on Friday proposed two sweeping rules aimed at preventing the contamination of produce and processed foods, which has sickened tens of thousands of Americans annually in recent years.

The proposed rules represent a sea change in the way the agency polices food, a process that currently involves taking action after contamination has been identified. It is a long-awaited step toward codifying the food safety law that Congress passed two years ago.

Changes include requirements for better record keeping, contingency plans for handling outbreaks and measures that would prevent the spread of contaminants in the first place. While food producers would have latitude in determining how to execute the rules, farmers would have to ensure that water used in irrigation met certain standards and food processors would need to find ways to keep fresh food that may contain bacteria from coming into contact with food that has been cooked.

New safety measures might include requiring that farm workers wash their hands, installing portable toilets in fields and ensuring that foods are cooked at temperatures high enough to kill bacteria.

Whether consumers will ultimately bear some of the expense of the new rules was unclear, but the agency estimated that the proposals would cost food producers tens of thousands of dollars a year.

A big question to be resolved is whether Congress will approve the money necessary to support the oversight. President Obama requested $220 million in his 2013 budget, but Dr. Margaret Hamburg, commissioner of the F.D.A., said “resources remain an ongoing concern.”

Nonetheless, agency officials were optimistic that the new rules would protect consumers better.

“These new rules really set the basic framework for a modern, science-based approach to food safety and shift us from a strategy of reacting to problems to a strategy for preventing problems,” Michael R. Taylor, deputy commissioner for foods and veterinary medicine, said in an interview. The Food and Drug Administration is responsible for the safety of about 80 percent of the food that Americans consume. The rest falls to the Agriculture Department, which is responsible for meat, poultry and some eggs.

One in six Americans becomes ill from eating contaminated food each year, the government estimates; most of them recover without concern, but roughly 130,000 are hospitalized and 3,000 die. The agency estimated the new rules could prevent about 1.75 million illnesses each year.

Congress passed the Food Safety Modernization Act in 2010 after a wave of incidents involving tainted eggs, peanut butter and spinach sickened thousands of people and led major food makers to join consumer advocates in demanding stronger government oversight.

But it took the Obama administration two years to move the rules through the regulatory agency, prompting complaints that the White House was more concerned about protecting itself from Republican criticism than about public safety.

Mr. Taylor said that the delay was a function of the wide variety of foods and the complexity of the food system. “Anything that is important and complicated will always take longer than you would like,” he said.

The first rule would require manufacturers of processed foods sold in the United States to come up with ways to reduce the risk of contamination. Food companies would be required to have a plan for correcting problems and for keeping records that government inspectors could audit.

An example might be to require the roasting of raw peanuts at a temperature guaranteed to kill salmonella, which has been a problem in nut butters in recent years. Roasted nuts would then have to be kept separate from raw nuts to further reduce the risk of contamination, said Sandra B. Eskin, director of the safe food campaign at the Pew Charitable Trusts.

“This is very good news for consumers,” Ms. Eskin said. “We applaud the administration’s action, which demonstrates its strong commitment to making our food safer.”

The second rule would apply to the harvesting and production of fruits and vegetables in an effort to combat bacterial contamination like E. coli, which is transmitted through feces. It would address what advocates refer to as the “four Ws” — water, waste, workers and wildlife.

Farmers would establish separate standards for ensuring the purity of water that touches, say, lettuce leaves and the water used to irrigate soil, which reaches plants only through their roots.

A farm or plant where vegetables are packaged might, for example, add lavatories to ensure that workers do not urinate in fields and post signs similar to those in restaurants that remind employees to wash their hands.

The food industry cautiously applauded the proposals, with most companies and industry groups noting that they would be poring over them and making comments as necessary in the coming weeks.

“Consumers expect industry and government to work together to provide Americans and consumers around the world with the safest possible products,” the Grocery Manufacturers Association said in a statement. The group added that the food safety act and putting it into effect “can serve as a role model for what can be achieved when the private and public sectors work together to achieve a common goal.”

The association noted that the government would have to issue more than 50 regulations to fully carry out the new law.

The businesses that must comply with the proposals may face new costs, but how much remains to be seen. Dr. Hamburg said that the measures might save businesses money in the long run, and that in many cases, they already take such precautions voluntarily.

The agency estimated that it would cost large individual farms as much as $30,000 a year to comply with the new rules, and the food manufacturing industry as a whole as much as $475 million a year. It said it would finance the regulations in part from savings within its budget and from fees for things like reinspections, which Congress has already authorized.

In a conference call with reporters, Mr. Taylor, the deputy commissioner, said some foods would require more attention than others. Fruits and vegetables destined for canning operations, for instance, might be subject to less stringent guidelines because they are processed using heat that would kill bacteria, unlike produce intended for raw consumption. Vegetables that are much more likely to be consumed cooked, like potatoes and artichokes, would be exempt from the rules, Mr. Taylor said.

“We were directed by Congress to establish risk-based standards that are practical, and we think this approach targets what will be significant from a public health standpoint,” he said. “If we get evidence to the contrary, we will make adjustments.”

While such precautions may seem obvious and some food producers and makers may already be taking them, there has not been any legal requirement they even consider doing so.

“We’re not going to relinquish all risk of contamination, but these steps will make us think more about what we can do to reduce it,” Mr. Taylor said.

After a 120-day period for public comment, the agency will complete the rules.

Other rules are pending, including one that would cover importers’ responsibilities for the safety of food products grown or made overseas. About 15 percent of food eaten by Americans — and an even higher percentage of produce — is imported.