Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

An outbreak of listeria linked to Blue Bell ice cream products has been going on quietly for as long as five years, federal health officials said Tuesday.

Genetic tests link Listeria bacteria from two separate Blue Bell factories to at least six cases of listeriosis dating back to 2010, the Centers for Disease Control and Prevention told NBC News.

The outbreak, which has killed three people and put seven others into the hospital, involves two distinct strains of the bacteria that have been making people sick from Kansas to South Carolina, the CDC says.

The three exposed people who died all were in Kansas.

Blue Bell’s recalled all of its products because of the outbreak, and says people should throw away any of its products in their refrigerators or freezers.

“CDC recommends that consumers do not eat any Blue Bell brand products, and that institutions and retailers do not serve or sell them," the agency said in a statement Tuesday.

Two of Blue Bell’s facilities were found to be contaminated — one in Texas and one in Oklahoma. And now, the CDC investigation shows they may have been contaminated as far back as 2010.

“This is a complex and ongoing multistate outbreak investigation of listeriosis illnesses occurring over several years,” CDC said in a statement. “Several strains of Listeria monocytogenes are involved in this outbreak. Information indicates that various Blue Bell brand products are the source of this outbreak.”

Genetic testing links Blue Bell ice cream that was just made to six cases of listeria in Texas, Oklahoma and Arizona dating back as far ago as 2010, says Dr. Robert Tauxe, an expert on foodborne diseases at CDC.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Tauxe says disease detectives discovered this when they were investigating the three deaths from listeria in Kansas.

“The investigators go to the freezer in the Kansas hospital and grab the Blue Bell ice cream there and start culturing it. And some of it matches what’s in the patients there, but one, I think it was chocolate, did not match what was in the patients at the Kansas hospital,” Tauxe told NBC News.

The genetic sequence did, however, match six old cases of listeria dating back to 2010.

“The ice cream had just been made, but the match was strong,” Tauxe said. The evidence goes right back to the Blue Bell factory in Oklahoma.

CDC has been able to find this out because of modern, whole-genome sequencing. As technology makes it easier and cheaper to test the entire genetic code of organisms, scientists can make these discoveries.

“CDC recommends that consumers do not eat any Blue Bell brand products."

So CDC’s chasing two strains of Listeria from two separate Blue Bell factories — one in Texas, and one in Oklahoma.

It’s a lot of ice cream.

“The products being recalled are distributed to retail outlets, including food service accounts, convenience stores and supermarkets in Alabama, Arizona, Arkansas, Colorado, Florida, Georgia, Illinois, Indiana, Kansas, Kentucky, Louisiana, Mississippi, Missouri, Nevada, New Mexico, North Carolina, Ohio, Oklahoma, South Carolina, Tennessee, Texas, Virginia, Wyoming and international locations,” Blue Bell says in a statement on its website.

Tauxe says CDC’s never tracked an outbreak of listeria going back so far. “It is not the biggest outbreak, not by any means,” he said. “But it is probably the longest outbreak of listeria.”

He doubts very many people were sickened by the ice cream over that time.

“It was an outbreak that went on for five years,” Tauxe said. “But it was like one case a year. It was very intermittent.” The cases were so spread apart that normally, they would not have caught CDC’s attention.

“It was an outbreak that went on for five years."

Tauxe says Blue Bell is doing the right thing now by closing its factories, recalling all products and doing a deep clean. Listeria is especially problematic because it thrives in refrigerators and freezing doesn't kill it.

“Blue Bell is routinely a clean place,” Tauxe said. “But this outbreak puts Blue Bell on notice and I think it puts the entire ice cream industry on notice. They need to worry a good deal about Listeria.”

Listeria makes about 1,600 people sick every year in the United States and kills about 260, the CDC says. The very old, very young and pregnant women are most at risk. It causes fever, vomiting and diarrhea and can also cause meningitis.

"At this point, we cannot say with certainty how Listeria was introduced to our facilities. We continue to work with our team of experts to eliminate this problem," Blue Bell CEO Paul Kruse said in a statement.