A man shops for vegetables beside Romaine lettuce stocked and for sale at a supermarket in Los Angeles.

The strain of E. coli bacteria that contaminated romaine lettuce and was tied to the deaths of five people was found in a tainted irrigation canal in Arizona, federal officials said on Thursday.

The outbreak appeared to be over, more than three months after the first illnesses were recorded, the Centers for Disease Control and Prevention said.

Samples of canal water in the Yuma area of Arizona were found to contain the same genetic strain of E. coli that caused the outbreak, Dr. Scott Gottlieb, commissioner of the federal Food and Drug Administration, said in a statement.

More from the New York Times:

E.Coli deaths linked to romaine lettuce, officials say

Arizona farm blamed for part of large, nationwide E.Coli outbreak

Romaine riddle: why the E.Coli outbreak eludes food investigators

When eight inmates at an Alaska prison got sick, F.D.A. investigators traced the illness back to whole-head romaine lettuce that was harvested from Harrison Farms in the Yuma area. Health officials said the lettuce that caused the national outbreak was linked to many farms in the region. Representatives of Harrison Farms could not be reached for comment on Saturday.

Questions remain about how the bacteria ended up in the canal.

“More work needs to be done to determine just how and why this strain of E. coli O157:H7 could have gotten into this body of water and how that led to contamination of romaine lettuce from multiple farms,” Dr. Gottlieb said.

Health officials collected water, soil and manure samples from the Yuma region to try to determine the precise source of the bacteria.

Of the five people who died, two lived in Minnesota, and the others were from Arkansas, California and New York, according to the C.D.C. Those sickened were from 36 states.

It was the largest E. coli flare-up in more than a decade. More than 200 people got sick and about half of them had to be hospitalized.

In 2006, nearly 200 people were sickened by tainted spinach in 26 states; a single California produce company was at the center of that outbreak. The most recent contamination was more widespread.

“This is a broader contamination event that impacted a lot of farms and ranches, and then went into the supply chain and amplified out,” said Bill Marler, a lawyer in Seattle who represents more than 100 people who were sickened.

Mr. Marler said many of his clients were still experiencing health problems, such as the effects of kidney failure, after eating contaminated lettuce. Many of those hospitalized developed a type of kidney failure called hemolytic uremic syndrome, according to the C.D.C.

Industry representatives in Arizona are seeking to ensure contaminated water does not affect next year’s crops, which will be planted in August, said Teressa Lopez, a spokeswoman for the Arizona Leafy Greens Food Safety Committee, an organization for producers and shippers of leafy greens.

The organization is waiting for more information from the F.D.A., including how the bacteria got there in the first place and the specific farms that were affected.

Ms. Lopez said potential solutions include finding a different water source for the crops or treating the water with chemicals to ensure it is bacteria-free.