Acute intermittent porphyria (AIP) is one of four forms of acute porphyria that is caused by an inherited deficiency of PBGD, which catalyses the third enzymatic step in the biosynthesis of heme. Here, HMBS is linked to autoimmune pancreatitis.