Three premature babies have died after being infected by bacteria while in a neonatal intensive care unit at a hospital in central Pennsylvania, where five other babies were also sickened, hospital officials said on Monday.

Officials with the Geisinger Medical Center in Danville, Pa., said they did not yet know the source of the infections, which occurred over several months starting in July. The hospital said it was diverting care of some premature babies to other local hospitals while it investigated the infections.

Dr. Rosemary Leeming, the chief medical officer at Geisinger, said at a news conference on Monday that all of the infected babies were “extremely premature.”

The three babies died in August and September. All three were born before 27 weeks of gestation, hospital officials said.