HMBS and autoimmune pancreatitis: AIP is caused by deficiency of porphobilinogen deaminase (PBGD) or hydroxymethylbilane synthase (HMBS), the third enzyme in the heme biosynthetic pathway.