BACKGROUND: Bariatric surgery leads to early and long-lasting remission of type 2 diabetes (T2D). However, the mechanisms behind this phenomenon remain unclear. Among several factors, gut hormones are thought to be crucial mediators of this effect. Unlike GLP-1, the role of the hormone peptide tyrosine tyrosine (PYY) in bariatric surgery in humans has been limited to appetite regulation and its impact on pancreatic islet secretory function and glucose metabolism remains under-studied. METHODS: Changes in PYY concentrations were examined in obese patients after bariatric surgery and compared to healthy controls. Human pancreatic islet function was tested upon treatment with sera from patients before and after the surgery, in presence or absence of PYY. Alterations in intra-islet PYY release and insulin secretion were analysed after stimulation with short chain fatty acids (SCFAs), bile acids and the cytokine IL-22. FINDINGS: We demonstrate that PYY is a key effector of the early recovery of impaired glucose-mediated insulin and glucagon secretion in bariatric surgery. We establish that the short chain fatty acid propionate and bile acids, which are elevated after surgery, can trigger PYY release not only from enteroendocrine cells but also from human pancreatic islets. In addition, we identify IL-22 as a new factor which is modulated by bariatric surgery in humans and which directly regulates PYY expression and release. INTERPRETATION: This study shows that some major metabolic benefits of bariatric surgery can be emulated ex vivo. Our findings are expected to have a direct impact on the development of new non-surgical therapy for T2D correction