In summary, we present the first evidence that XBP1 maintains mature beta cell identity, represses beta-to-alpha cell transdifferentiation and is required for beta cell protection against diabetes in insulin resistance states. This evidence concerns the gene XBP1 and diabetes mellitus.