The liver, sited in the right upper quadrant of the abdomen, comprises eight segments, each of which is a complete functional unit with a single portal pedicle and a hepatic vein. Within the functional segments, the structural unit is the hepatic lobule, a polyhedron surrounded by four to six portal tracts containing hepatic arterial and portal venous branches from which blood perfuses through sinusoids, surrounded by walls of hepatocytes that are a single cell thick and lined by specialized endothelial cells with ‘windows’ (fenestrae), to the centrilobular region and the central hepatic veins. Bile secreted through the canalicular membrane of the hepatocyte collects in biliary canaliculi, from which it passes through the biliary tract into the gut. The liver secretes bile, which aids digestion by emulsifying lipids, and has a central role in metabolism of (1) bilirubin, from haem; (2) bile salts, the principal mechanism for clearance of cholesterol; (3) carbohydrates; (4) amino acids and ammonia; (5) proteins, most circulating plasma proteins being produced by hepatocytes; and (6) lipid and lipoproteins. The pancreas lies in the retroperitoneum and is composed of (1) an exocrine portion centred on acini, producing an alkaline secretion containing digestive enzymes including serine proteases, exopeptidases, and lipolytic enzymes, draining through a ductal system into the duodenum; and (2) the islets of Langerhans, which secrete insulin (also glucagon, somatostatin, and pancreatic polypeptide).