All pancreatic endocrine cell types arise from a common endocrine precursor cell population, yet the molecular mechanisms that establish and maintain the unique gene expression programs of each endocrine cell lineage have remained largely elusive. Such knowledge would improve our ability to correctly program or reprogram cells to adopt specific endocrine fates. Here, we show that the transcription factor Nkx6.1 is both necessary and sufficient to specify insulin-producing beta cells. Heritable expression of Nkx6.1 in endocrine precursors of mice is sufficient to respecify non-beta endocrine precursors towards the beta cell lineage, while endocrine precursor- or beta cell-specific inactivation of Nkx6.1 converts beta cells to alternative endocrine lineages. Remaining insulin(+) cells in conditional Nkx6.1 mutants fail to express the beta cell transcription factors Pdx1 and MafA and ectopically express genes found in non-beta endocrine cells. By showing that Nkx6.1 binds to and represses the alpha cell determinant Arx, we identify Arx as a direct target of Nkx6.1. Moreover, we demonstrate that Nkx6.1 and the Arx activator Isl1 regulate Arx transcription antagonistically, thus establishing competition between Isl1 and Nkx6.1 as a critical mechanism for determining alpha versus beta cell identity. Our findings establish Nkx6.1 as a beta cell programming factor and demonstrate that repression of alternative lineage programs is a fundamental principle by which beta cells are specified and maintained. Given the lack of Nkx6.1 expression and aberrant activation of non-beta endocrine hormones in human embryonic stem cell (hESC)-derived insulin(+) cells, our study has significant implications for developing cell replacement therapies.