Biliopancreatic diversion is a type of bariatric surgery that involves reducing the size of the stomach as well as bypassing most of the small intestine in order to decrease food intake and nutrient absorption, thus producing weight loss. Part of the stomach is removed to reduce its size. This smaller stomach is then connected directly to the lower portion of the small intestine. Therefore, food enters the stomach and travels directly to the lower part of the small intestine, bypassing the majority of the small intestine. A variation of this surgery is biliopancreatic diversion with duodenal switch. In this variation, a different part of the stomach is removed so that the pylorus sphincter remains functional. These procedures can be done via open surgery or laparoscopically.