Methods and materials for occluding a pancreatic fistula are described herein. One method for occluding a pancreatic fistula includes administering an effective amount of a self-assembling peptide solution to a pancreatic fistula, where the self-assembling peptide is between about 7 amino acids and 32 amino acids in length and the self-assembling peptide solution forms a hydrogel under physiological conditions, thereby occluding the pancreatic fistula.