Compositions and methods of producing mammalian cell populations that include a high proportion of pancreatic beta cells are described herein. Such cell populations are useful for treatment of diabetes. Also provided are materials and methods for the direct differentiation of stem cells, such as embryonic stem cells, into functional pancreatic beta cells. The disclosure provides the benefit of direct differentiation, which results in the production of functional pancreatic beta cells efficiently and at low cost.