The pattern of porphyrin metabolite excretion in urine, faeces, and plasma was typical for an acute intermittent porphyria (AIP), which is caused by inherited autosomal dominant mutations in the gene for hydroxymethylbilane synthase (HMBS), the third enzyme in the heme biosynthetic pathway. Here, HMBS is linked to autoimmune pancreatitis.