Adults born preterm are at increased risk of impaired glucose tolerance and diabetes. Late gestation fetuses exposed to high blood glucose concentration also are at increased risk of impaired glucose tolerance as adults. Preterm babies commonly become hyperglycemic and are thus exposed to high blood glucose concentration at an equivalent stage of pancreatic maturation. It is not known whether preterm birth itself, or complications of prematurity, such as hyperglycemia, alter later pancreatic function. To distinguish these, we made singleton preterm lambs hyperglycemic (HYPER) for 12 days after birth with a dextrose infusion and compared them with vehicle-treated preterm and term controls and with HYPER lambs made normoglycemic with an insulin infusion. Preterm birth reduced β-cell mass, apparent by 4 weeks after term and persisting to adulthood (12 mo), and was associated with reduced insulin secretion at 4 months (juvenile) and reduced insulin mRNA expression in adulthood. Hyperglycemia in preterm lambs further down-regulated key pancreatic gene expression in adulthood. These findings indicate that reduced β-cell mass after preterm birth may be an important factor in increased risk of diabetes after preterm birth and may be exacerbated by postnatal hyperglycemia.