The intramolecular nucleophilic reaction of a phenolic hydroxyl group at the active site of papain.