Sunflower trypsin inhibitor-1 (SFTI-1) is a 14-amino acid cyclic peptide that shares an inhibitory loop with a sequence and structure similar to a larger family of serine protease inhibitors, the Bowman-Birk inhibitors. Here, we focus on the P5' residue in the Bowman-Birk inhibitory loop and produce a library of SFTI variants to characterize the P5' specificity of 11 different proteases. We identify seven amino acids that are generally preferred by these enzymes and also correlate with P5' sequence diversity in naturally occurring Bowman-Birk inhibitors. Additionally, we show that several enzymes have divergent specificities that can be harnessed in engineering studies. By optimizing the P5' residue, we improve the potency or selectivity of existing inhibitors for kallikrein-related peptidase 5 and show that a variant with substitutions at 7 of the scaffold's 14 residues retains a similar structure to SFTI-1. These findings provide new insights into P5' specificity requirements for the Bowman-Birk inhibitory loop.