Public Health England (PHE) is investigating an outbreak of E. coli O157, which has so far affected 151 people, mainly in the South West.
There have been 144 cases in England, six in Wales and one in Scotland. PHE did not say where the two people died.
It is looking into whether salad leaves - possibly including rocket imported from the Mediterranean - may be to blame.
PHE said it had advised "a small number of wholesalers" to stop adding some imported rocket leaves to their mixed salad bags as a precautionary measure.
Dr Isabel Oliver, director of PHE's field epidemiology service, said: "PHE has been working to establish the cause of the outbreak and has identified that several of the affected individuals ate mixed salad leaves including rocket leaves prior to becoming unwell.
"Currently, the source of the outbreak is not confirmed and remains under investigation; we are not ruling out other food items as a potential source.
"PHE is using various approaches including whole genome sequencing (WGS) technologies to test samples from those affected. WGS technologies are at the forefront of improving the diagnosis of infectious diseases and this testing has indicated that the strain involved is likely to be an imported strain, possibly from the Mediterranean area.
"PHE is also working closely with the Food Standards Agency to trace, sample and test salad products grown in the UK and other parts of Europe. All food sample results to date have been negative for E.coli O157, but it's important to be aware that where food has been contaminated with E.coli O157, it is not always possible to identify the bacteria on food testing."
E. coli O157 can cause a range of symptoms, including mild to bloody diarrhoea and severe abdominal pain.
It can be passed on to other people through poor hand washing and poor toilet hygiene.
PHE said people should remove any loose soil before storing vegetables. They should also thoroughly wash all vegetables and salads which will be eaten raw unless they have been pre-prepared and are labelled "ready to eat".
It said people should wash their hands with soap and water after using the toilet, before and after handling food, and after contact with pets and animals, including farm animals.
Young children should also be supervised when they wash their hands.
PHE first became aware of the possibility of an E.coli O157 outbreak in the south of England at the end of June.