Security guards onboard the Maersk-Alabama container ship fended off Somali pirates in a shoot-out, months after a previous raid ended with the dramatic rescue of the vessel's skipper.
The US ship was attacked 560 nautical miles off the northeast coast of Somalia, the Bahrain-based US Navy's Fifth Fleet said.
Pirates came within 275 metres of the Maersk before being beaten back by a security team using small arms and a pain-inducing acoustic weapon, the navy said in a statement.
In April the ship was briefly seized by pirates, and captain Richard Phillips was held on a pirate skiff for five days.
The standoff was only ended when US navy sharp shooters attacked the vessel, killing three suspected pirates and capturing one.
"The security team embarked aboard Maersk-Alabama responded to the attack by using evasive manoeuvres, long-range acoustic devices and small arms fire," the Navy said.
"Due to Maersk-Alabama following maritime industry's best practises, such as embarking security teams, the ship was able to prevent being successfully attacked by pirates," Vice Admiral Bill Gortney, commander of US Naval Forces Central Command, said.