The cyanobacterial protease inhibitor microviridin K is ribosomally biosynthesized as a prepeptide (MvdE) and subsequently modified posttranslationally by double lactonization followed by lactamization. Two proteins belonging to the GRASP superfamily of ligases catalyze these ring closures. We here show that one of these ligases (MvdD) forms the lactones in a specific order, the larger ring being formed first, and that the ring size requirement for both lactonizations is stringent. However, for the first cyclization MvdD accepts alanine substitution in all C-terminal positions of the microviridin prepeptide that are not directly involved in the cross-linking, whereas the second lactonization is dependent on the presence of specific residues in MvdE. This suggests that MvdD possesses some, albeit limited, substrate tolerance that might be useful for the modification of peptides and proteins not belonging to the microviridin group of metabolites.