Genome-wide association studies have revealed that common noncoding variants in MTNR1B (encoding melatonin receptor 1B, also known as MT(2)) increase type 2 diabetes (T2D) risk(1,2). Although the strongest association signal was highly significant (P < 1 × 10(-20)), its contribution to T2D risk was modest (odds ratio (OR) of ∼1.10-1.15)(1-3). We performed large-scale exon resequencing in 7,632 Europeans, including 2,186 individuals with T2D, and identified 40 nonsynonymous variants, including 36 very rare variants (minor allele frequency (MAF) <0.1%), associated with T2D (OR = 3.31, 95% confidence interval (CI) = 1.78-6.18; P = 1.64 × 10(-4)). A four-tiered functional investigation of all 40 mutants revealed that 14 were non-functional and rare (MAF < 1%), and 4 were very rare with complete loss of melatonin binding and signaling capabilities. Among the very rare variants, the partial- or total-loss-of-function variants but not the neutral ones contributed to T2D (OR = 5.67, CI = 2.17-14.82; P = 4.09 × 10(-4)). Genotyping the four complete loss-of-function variants in 11,854 additional individuals revealed their association with T2D risk (8,153 individuals with T2D and 10,100 controls; OR = 3.88, CI = 1.49-10.07; P = 5.37 × 10(-3)). This study establishes a firm functional link between MTNR1B and T2D risk.