Grocery stores and butcher shops will have to keep better track of their ground beef following a new rule issued by the U.S. Department of Agriculture in response to a salmonella outbreak four years ago from ground beef sold at Hannaford supermarkets.

The new rule, which requires that more detailed records be kept of ground beef production and ground beef equipment cleaning procedures, is being released Monday by the USDA’s Food Safety and Inspection Service. It is designed to help public health officials quickly search records to identify the exact source of meat linked to food poisoning outbreaks. It goes into effect in 180 days.

The rule was prompted by a salmonella outbreak traced to ground beef sold by Hannaford supermarkets, the Scarborough-based grocery chain, federal officials said. The late 2011 incident sickened 20 people in seven states, including four in Maine. Hannaford’s record keeping met federal requirements at the time of the incident. But the source of the contamination was never identified by the USDA, which had recommended better record keeping as far back as 1998 but did not require it until now.

The lack of record keeping that created a gap in the nation’s food-safety system was detailed in a Portland-Press Herald/Maine Sunday Telegram special report in March 2012.

In anticipation of the new rule’s announcement, Hannaford officials said Sunday they have already adopted steps that put their ground beef production practices in line with the new rule.

“Our store record-keeping practices meet USDA’s current industry guidance for retail stores. We are 100 percent confident that our record-keeping will deliver against the requirements of the final rule,” said Michael Norton, a Hannaford spokesman.

Federal officials said they have tried to keep the cost of meeting the new requirements low for small businesses.

Some independent butcher shops in Maine said they knew little about the new rule and worried about being overwhelmed with paperwork. But, they said, being able to trace meat from the cow to customer makes sense.

Omen Viele, manager of Rosemont Bakery and Market, which operates three stores in Portland, said the new requirements make sense for large-scale grocery operations but may be unnecessary for small-scale butcher shops like Rosemont.

Viele said each week Rosemont processes two cows from one of several farms in Maine so he knows exactly where his ground beef and burger blend come from.

“We are a pretty direct line. I know my farmers, I know where the meat is processed and I know my customers. It is a pretty short circuit,” said Viele.

He said he does not keep a written log but all the meat is labeled and dated. He said the meat-grinding equipment is cleaned regularly but he does not keep a written record of the cleanings.

“The USDA has never leaned on me for any kind of that stuff,” said Viele.

Adam Tice, meat manager at Pat’s Meat Market on Stevens Avenue in Portland, said the new rule could make for more work but would probably not present a big change from what his market already does to ensure food safety. He said the store already keeps a log noting the production and equipment sanitation dates.

“We already do quite a bit,” but the new rule is a “good thing,” said Tice.

Alfred Almanza, deputy undersecretary for food safety at agricultural department, who wrote an opinion column on the new rule that appears in Monday’s Portland Press Herald, said the rule resulted largely from the Hannaford incident.

“While the Food Safety and Inspection Service was able to trace the illnesses back to the supermarket that sold it, a lack of information about the source of the materials used to make the ground beef prevented us from going back further to the establishment that produced them,”Almanza wrote.

The new rule requires all establishments that grind raw beef products to maintain records of the businesses that supply material used to prepare each lot of raw ground beef product, all supplier lot numbers and production dates, the dates and times of each lot of raw ground beef produced, the dates and times of cleanings and sanitizations of grinding equipment, and other information.

The rule covers supermarkets, meat markets, warehouse clubs, cooperatives, super centers, convenience stores and wholesalers that grind raw beef. It does not apply to restaurants.

The federal government recommended in 2009 that businesses keep grinding logs. Today many do so but most are incomplete, according to the USDA.

While 74 percent of chain retail stores and 12 percent of independent retail stores kept logs, 78 percent of those were incomplete, a 2008 USDA study found.

The Food Safety and Inspection Service said it will reach out to businesses affected by the new rule with webinars and newsletters. A link to the new rule will appear on the USDA’s Food Safety and Inspection Service website Monday.