The navy said its warship’s crew boarded the vessel at the weekend, arrested 25 suspected pirates and freed 14 people from Iran and Pakistan.