Five young Somali men face life in prison after being convicted of piracy in the April attack on a US Navy ship.
Prosecutors said the men attacked the USS Nicholas after mistaking it for a merchant ship and were out for as much as $40,000 (£24,800) in ransom money.
But the men's lawyers maintained the five only fired their weapons to attract attention and get help.
The verdict is the first in a piracy case in the US in nearly 200 years. The men face a mandatory life sentence.
The five men were convicted of piracy, attacking to plunder a maritime vessel, and assault with a dangerous weapon.
They were arrested in April, along with six others who were captured a few days later in waters near Djibouti after allegedly shooting at the USS Ashland, an amphibious vessel.
Lawyers for the men said they were fishermen who had been forced by pirates to attack the ship.
The trial took place in Norfolk in the US state of Virginia, one of the largest naval bases in the world and home port to the USS Nicholas.
The crew of five young defendants, mostly fishermen in their mid-20s, had set sail from Somalia in March in search of a merchant vessel to plunder, according to documents filed in the federal court.
Their ship carried food and fuel and had two smaller skiffs tied to it, which prosecutors say were to serve as attack craft. The men were armed with assault weapons and a rocket-propelled grenade, prosecutors said.
One of the defendants, Mohammed Mohdin Hassan, told investigators he had been promised $30,000 (£18,552) for a successful mission, according to court documents.
About eight days later, on the high seas and under cover of night, Hasan, Gabul Abdullahi Ali and Abdi Wali Dire boarded one of the attack craft and set out to attack what they believed was a merchant ship, prosecutors said.
In fact, the ship was the Nicholas, which had been deployed to the east coast of Africa on an anti-piracy mission.
Hasan and Dire brought the attack skiff close to the Nicholas and opened fire, prosecutors said. The Nicholas returned fire and gave chase, capturing the defendants and taking them aboard the ship and destroying their skiff.