The most frequently used and effective treatment for morbid obesity is Roux-en-Y gastric bypass surgery (RYGB), which results in rapid remission of type 2 diabetes in most cases. To what extent this is accounted for by weight loss or other factors remains elusive. To gain insight into these mechanisms, we investigated the effects of RYGB on β-cell function and β-cell mass in the pig, a species highly reminiscent of the human. RYGB was performed using linear staplers during open surgery. Sham-operated pigs were used as controls. Both groups were fed a low-calorie diet for 3 weeks after surgery. Intravenous glucose tolerance tests were performed 2 weeks after surgery. Body weight in RYGB pigs and sham-operated, pair-fed control pigs developed similarly. RYGB pigs displayed improved glycemic control, which was attributed to increases in β-cell mass, islet number, and number of extraislet β-cells. Pancreatic expression of insulin and glucagon was elevated, and cells expressing the glucagon-like peptide 1 receptor were more abundant in RYGB pigs. Our data from a pig model of RYGB emphasize the key role of improved β-cell function and β-cell mass to explain the improved glucose tolerance after RYGB as food intake and body weight remained identical.