Dr. Eilish Cleary, the chief medical officer of health, says laboratory results show the patterns of the three cases from Fredericton and two in Saint John are closely matching.
Cleary says officials continue to search for the source of the infection and are trying to determine if any connections exist with cases outside the province.
Health officials in Nova Scotia are dealing with 10 cases of E. coli.
The strain of E. coli is the same one found in the Walkerton, Ont., water disaster in 2000 that killed seven people.
Symptoms of the gastro-intestinal illness include severe cramps, bloody diarrhea and vomiting.
To prevent the infections from spreading, Cleary says people should wash their hands thoroughly after using the washroom or changing diapers.
Other precautions include washing and peeling raw vegetables and fruits, thoroughly cooking all meats and to prevent contact between cooked foods and raw poultry and other meats.
Also on HuffPost