Pirates have used rocket-propelled grenades and automatic weapons to attack another US merchant ship off the coast of Somalia.
The pirates damaged the Liberty Sun, which was carrying a cargo of food aid, but were not able to board it.
The ship asked for assistance from the American warship involved in the rescue of a US captain seized last week.
Pirates have vowed to avenge the deaths of those killed in recent rescue operations by US and French forces.
BBC security correspondent Rob Watson says the latest attack shows that pirates have not been deterred by military operations.
Despite renewed US calls to quell piracy, four more vessels have been successfully seized over the past two days.
Details of attack
Owners of the Liberty Sun and the US military confirmed reports of the latest, failed attack, which took place on Tuesday at midday local time.
Some details were revealed in an e-mail from one of the crewmen to his mother at her home in Illinois, AP news agency reported.
Crew member Tom Urbik's parents speak of their concern
"We are under attack by pirates, we are being hit by rockets, also bullets," Thomas Urbik, 26, told his mother, Katy.
"We are barricaded in the engine room and so far no-one is hurt. (A) rocket penetrated the bulkhead but the hole is small. Small fire, too, but put out."
Lt Nathan Christensen, of the US Fifth Fleet in Bahrain, told the BBC that the ship had taken "evasive manoeuvre action" which had prevented the pirates from boarding.
The Liberty Sun had been en route to Mombasa from Houston, Texas, when the attack took place.
After coming under fire, the ship immediately requested assistance from the USS Bainbridge, said owners Liberty Maritime Corp in a statement.
The navy destroyer arrived some hours later, by which time the pirates had gone.
"We are grateful and pleased that no-one was injured and the crew and the ship are safe," said the Liberty Maritime Corp statement.
The ship did sustain some damage, it said, but was able to resume its journey to Mombasa.
The operation to free Captain Richard Phillips, who was held captive in a lifeboat for five days, ended with three pirates being shot dead by marksmen from the USS Bainbridge on Sunday.
Somali pirate leaders - who have generally treated captives well in the hope of winning big ransom payouts - said they would avenge the deaths.
"No-one can deter us from protecting our waters from the enemy because we believe in dying for our land," Omar Dahir Idle told AP by telephone from the Somali coastal town of Harardhere.
Because Capt Phillips was on board the USS Bainbridge when it was diverted to the Liberty Sun, he was unable to be reunited with his shipmates from the Maersk Alabama, in Mombasa, before they flew back to the US.
The crew began their journey back to the US on Wednesday, with Capt Phillips due to fly back on a separate flight later.
US President Barack Obama promised on Monday to "halt the rise of piracy" in one of the world's busiest shipping lanes.
But in the 48 hours prior to the latest attack, four vessels have been seized in the same area:
A Lebanese-owned cargo ship, the MV Sea Horse, was taken by gunmen in up to four skiffs
A Greek-owned bulk carrier, the MV Irene, was also seized
Two Egyptian fishing boats were held the previous day
Meanwhile, three Somali pirates who had taken French hostages are in custody in France, French prosecutors say.
The pirates were captured during a military operation to free hostages taken on the Tanit, a French yacht seized in the Gulf of Aden on 4 April.
The boat's French skipper and two other pirates were killed in the operation.
Lt Christensen said that although 15 countries had navies operating in the Gulf of Aden and off the coast of Somalia, the area was too large to prevent all attacks.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.