The molecular clock maintains energy constancy by producing circadian oscillations of rate-limiting enzymes involved in tissue metabolism across the day and night. During periods of feeding, pancreatic islets secrete insulin to maintain glucose homeostasis, and although rhythmic control of insulin release is recognized to be dysregulated in humans with diabetes, it is not known how the circadian clock may affect this process. Here we show that pancreatic islets possess self-sustained circadian gene and protein oscillations of the transcription factors CLOCK and BMAL1. The phase of oscillation of islet genes involved in growth, glucose metabolism and insulin signalling is delayed in circadian mutant mice, and both Clock and Bmal1 (also called Arntl) mutants show impaired glucose tolerance, reduced insulin secretion and defects in size and proliferation of pancreatic islets that worsen with age. Clock disruption leads to transcriptome-wide alterations in the expression of islet genes involved in growth, survival and synaptic vesicle assembly. Notably, conditional ablation of the pancreatic clock causes diabetes mellitus due to defective beta-cell function at the very latest stage of stimulus-secretion coupling. These results demonstrate a role for the beta-cell clock in coordinating insulin secretion with the sleep-wake cycle, and reveal that ablation of the pancreatic clock can trigger the onset of diabetes mellitus.