A federal prosecutor told a jury Wednesday that five Somali men attacked a U.S. Navy ship off the coast of Africa after mistaking it for a merchant ship, while defense attorneys said their clients are innocent fishermen who were abducted and forced into piracy under threat of death.

The conflicting accounts of the April 1 event came in what legal scholars say is the first piracy prosecution to go to trial in the U.S. since the Civil War.

The defendants are accused of shooting at the USS Nicholas, which was part of an international flotilla combating piracy in the seas off Somalia. If convicted of the piracy charge — the most serious of 14 counts — the five men face mandatory life terms.

John S. Davis, an assistant U.S. attorney, said evidence will prove that three of the men were in a skiff that opened fire on the Nicholas with assault rifles, then fled when sailors returned fire with machine guns. He said the sailors tossed the rifles and a grenade launcher that was not fired into the sea before they were captured.

Davis said all the men later confessed to the attack in a confession to an interpreter aboard the Nicholas. He said the defendants said they expected to make anywhere from $10,000 to as much as $40,000 from the ransom.

"They all readily admitted their guilt," Davis said.

Defense attorneys said it is not uncommon in virtually lawless Somalia for pirates to capture fishermen and essentially enslave them, forcing them to either do their bidding or be killed. They said that's what happened to their clients.

William J. Holmes, attorney for Gabul Abdullah Ali, said the men weren't trying to attack the Nicholas but that they fired shots into the air so their captors would think they were doing as they were ordered. What they really wanted, he suggested, was to be rescued.

"They were trying to escape from the pirates and seek some help," he said.

David Bouchard, attorney for Abdi Wali Dire, said it is absurd to think the pirates would mistake a heavily armed Navy ship for a merchant vessel — especially on a clear, moonlit night like Davis described.

Dire "was not trying to forcibly take over any vessel or shoot or hurt anyone — he was just trying to save his neck," Bouchard said.

Jon N. Babineau said his client, Abdi Mohammed Gurewardher, was aboard what Davis described as the mother ship. He said it was actually an unsophisticated fishing boat that resembled a giant bathtub. He said the pirates took over the boat but later abandoned it, with Gurewardher and Abdi Mohammed Umar still aboard, after it broke down. He said they had been drifting for a couple of days when they were captured by the Navy.

The other defendant is Mohammed Modin Hasan, the third man on the skiff. His attorney, James Richard Theuer, questioned the validity of the confessions taken by the Navy-supplied interpreter and noted that the statements were not videotaped even though the equipment was available. The interpreter is expected to testify at the trial.

Other countries have recently held piracy trials, but legal and maritime scholars say one of the last in the U.S. was in 1861 when 13 Southern privateers aboard the schooner Savannah were prosecuted in New York City. The jury deadlocked and the men were later exchanged with the South.