Mice lacking the tumour suppressor p53 are partially protected from developing diabetes. Here the authors show that p53 is upregulated in the pancreas of diabetic mice where it impairs β cell function by repressing expression of mitochondrial pyruvate carboxylase, thereby inhibiting insulin secretion.