Despite intense efforts over the past 30 years, human pancreatic β cell lines have not been available. Here, we describe a robust technology for producing a functional human β cell line using targeted oncogenesis in human fetal tissue. Human fetal pancreatic buds were transduced with a lentiviral vector that expressed SV40LT under the control of the insulin promoter. The transduced buds were then grafted into SCID mice so that they could develop into mature pancreatic tissue. Upon differentiation, the newly formed SV40LT-expressing β cells proliferated and formed insulinomas. The resulting β cells were then transduced with human telomerase reverse transcriptase (hTERT), grafted into other SCID mice, and finally expanded in vitro to generate cell lines. One of these cell lines, EndoC-βH1, expressed many β cell-specific markers without any substantial expression of markers of other pancreatic cell types. The cells secreted insulin when stimulated by glucose or other insulin secretagogues, and cell transplantation reversed chemically induced diabetes in mice. These cells represent a unique tool for large-scale drug discovery and provide a preclinical model for cell replacement therapy in diabetes. This technology could be generalized to generate other human cell lines when the cell type-specific promoter is available.