Aims/hypothesis The aim of this study was to analyse the mechanisms underlying the improvement in glucose tolerance seen in morbidly obese patients undergoing biliopancreatic diversion (BPD). Subjects and methods We evaluated glucose tolerance (by OGTT), insulin sensitivity (euglycaemic-hyperinsulinaemic clamp and the OGTT index OGIS) and beta cell function (OGTT modelling analysis) in 32 morbidly obese (BMI=52± 7 kg/m 2 , mean±SD) patients (12 with NGT, 9 with IGT and 11 with type 2 diabetes), before and after BPD, and in 22 lean control subjects. Patients were studied before and from 7 days to 60 months after surgery. Results BPD improved glucose tolerance in all subjects, who after surgery all had normal glucose tolerance. Insulin sensitivity was restored to normal levels in all subjects (pre-BPD 341±79 ml min −1 m −2 , post-BPD 511±57 ml min −1 m −2 , lean 478±49 ml min −1 m −2 ). The insulin sensitivity change was detectable within 10 days of BPD. At baseline, beta cell sensitivity to glucose was impaired in diabetic subjects (25 [18] pmol min −1 m −2 l mmol −1 , median [interquartile range]) compared with lean subjects (82 [98]; p≤0.05). After BPD, beta cell glucose sensitivity showed a tendency towards improvement but remained impaired in diabetic subjects (30 [62]; p<0.01 vs lean). Total insulin output decreased in parallel with the insulin sensitivity increase in all groups. In the whole patient group, mean OGTT glucose levels were inversely related to both insulin sensitivity and beta cell glucose sensitivity (r 2 =0.67, partial r=−0.76 and −0.41, respectively). NEFAs, leptin and adiponectin were related to insulin sensitivity but could not explain the early improvement. Conclusions/interpretation Following BPD, glucose tolerance was restored mainly as a result of a rapid and large improvement in insulin sensitivity.