Acute intermittent porphyria (AIP) is a metabolic disorder caused by mutations in the porphobilinogen deaminase (PBGD) gene, encoding the third enzyme of the heme synthesis pathway. Here, HMBS is linked to autoimmune pancreatitis.