A Somali man has pleaded guilty in New York's court to seizing a US ship and kidnapping its captain last year.
Abdiwali Abdiqadir Muse now faces a minimum of 27 years in prison. He is expected to be sentenced in October.
Muse is the only surviving attacker of the Maersk Alabama merchant ship off Somalia's coast in April 2009.
He was captured by the US Navy, whose sharpshooters killed three other pirates trying to escape on a lifeboat, saving the captain.
During the trial in federal court in Manhattan, prosecutors described Muse as a ringleader of a gang of four pirates who seized the Maersk Alabama some 450km (280 miles) off the coast of Somalia.
A criminal complaint also said Muse was the first to board the vessel, firing his AK-47 assault rifle at Captain Richard Phillips.
On Tuesday, Muse said through an interpeter: "I am very, very sorry about what we did. All of this was about the problems in Somalia."
It is said to be the first piracy trial in the US in decades.
The vessel, which was carrying food aid, was seized by the four pirates in April 2009.
Capt Phillips then told his crew to lock themselves in a cabin and surrendered himself to safeguard his men.
He was later taken hostage in an enclosed lifeboat that was soon shadowed by US warships and a helicopter.
The stand-off only ended several days later when Navy sharpshooters killed three of the pirates, saving the captain.