Food manufacturers must be more vigilant about keeping their operations clean, according to new safety rules released Thursday by the government in the wake of deadly foodborne illness outbreaks linked to ice cream, caramel apples, cantaloupes and peanuts.

The rules, once promoted as an Obama administration priority, ran into long delays and much uncertainty and came out under a court-ordered deadline after advocacy groups had sued. Even then, the Food and Drug Administration allowed the Aug. 30 deadline to slip without releasing the rules to the public.

In all the fatal outbreaks, FDA investigators had found dirty equipment in food processing facilities. Federal inspectors have pointed to unclean equipment, unsanitary conditions and animal feces as likely causes for salmonella, E. coli and listeria poisonings that have sickened thousands in recent years.

The new rules will require food manufacturers to submit food safety plans to the government to show they are keeping their operations clean.

Congress passed the rules in 2010, and it took the FDA two years to write the specific requirements. The agency revised that proposal after some opposition to the first version from farmers and the food industry,

Under the rules, companies must have detailed safety plans that lay out how they handle the food, how they process it, how they clean their facilities and how they keep food at the right temperatures, among other safety measures.

Mindful of the high cost of outbreaks and recalls, food companies generally have supported the rules. Much of the controversy has centered on developing rules for farmers about how to grow produce in order to keep it safe. Those produce regulations are due in October.

Proponents have said the new laws are needed after several high-profile foodborne illness outbreaks. While many farmers and food manufacturers already follow good food safety practices, the law would aim to ensure that all of them do.