His squadron continued to protect American lives and property in Mexico and became in the same mission in Peru, defending them from attack by either side both during the Spanish blockade during the Peruvian War with Spain.