Hospitals in the industrial city of Faisalabad have treated 19,060 patients for diarrhea, stomach cramps and vomiting since May 14, said Rana Imran, district health officer for Faisalabad.
Nine people, including five children, have died of gastroenteritis, he said.
The water system supplying a working class neighborhood was contaminated with sewage earlier this month, causing the outbreak, said Aslam Chaudhry, the general health director for the province of Punjab, where Faisalabad is located.
Doctors have seen a sharp decline in the number of patients in recent days, and officials believe the problem has been brought under control.
Hospitals in other parts of Punjab province have also been receiving dozens of gastroenteritis patients daily, but officials don't believe those cases are related to the outbreak, Chaudhry said.
The area always sees an increase in gastroenteritis cases every summer, he said.
"Our people, especially in villages, have no idea about a hygienic lifestyle. They eat uncovered items from roadsides, even at homes. They do not use boiled water," he said.
Five people have died of gastroenteritis and around 2,900 treated at hospitals in Sindh province over the past two weeks, the Sindh director of general health, Hadi Bukhsh Jatoi, said.
Water systems in Pakistani cities are often poorly maintained, and their pipes sometimes run near wastewater outlets. Deaths from water contamination are common.