Richard Phillips left his home in the small Vermont town of Underhill at the end of March and made his way halfway around the world to join the ship.
His task was to pilot the Maersk Alabama on its trip from Oman and Djibouti to Mombasa, Kenya, to deliver food aid.
Phillips is 6 feet tall and burly, with a salt-and-pepper beard and a thick Boston accent. People who know him say he has a keen sense of humor, always ready to regale friends. At the helm, however, they say he is all business, a sailor's sailor.
Aboard the Alabama, Phillips kept in touch with his wife by e-mail. He wrote that pirate traffic was up.
The bandits announced themselves first with grappling hooks, then with gunfire. The pirates, four Somalis, tossed the hooks over the stern of the ship, hoisted themselves aboard and began firing into the air.
Phillips told his crew to lock themselves in a cabin. He surrendered himself to keep his men safe, according to the crew.
The crew managed to take one of the pirates and later gave him up in hopes the pirates would give up their captain. They did not. They escaped to a lifeboat, taking the captain with them.
The Navy sent a destroyer, the USS Bainbridge, toward the Alabama.
The Bainbridge's crew, coached by FBI hostage negotiators, talked to the pirates. If the military tried to attack, the bandits said, they would kill Phillips.
Lifeboats used by ships like the Alabama are enclosed, with ports that can open and close. One crew member said Phillips was essentially surviving inside a 120-degree oven.
About midnight, Thursday turning to Friday, Phillips made a break for it. He jumped out of the lifeboat and began to swim. One of the captors fired an automatic weapon. Phillips swam back to the lifeboat.
The Bainbridge was still several hundred yards away from the lifeboat — not nearly close enough to save him on his escape attempt. But the sailors on board were close enough to see that, back in the lifeboat, Phillips was moving around and talking. He appeared unharmed.
The standoff in the Gulf of Aden had become the very definition of an asymmetrical conflict: Four pirates, holding one hostage and bobbing in a lifeboat, vs. the United States Navy.
The Bainbridge kept constant watch, stalking the small boat from a distance. The destroyer was soon joined by the frigate USS Halyburton, which carries helicopters, then by the amphibious USS Boxer, which is the size of an aircraft carrier and can launch missiles.
It was early Friday night in Washington, Saturday morning over the Indian Ocean, when President Barack Obama authorized the Defense Department to use military force to rescue the sea captain, according to administration officials.
According to the White House, the National Security Council presented the president its last update Saturday evening on plans for rescuing Phillips. The message from the White House to the Bainbridge: If his life is in danger, take action.
Negotiations were not going well. One pirate surrendered.
The crew of the Bainbridge, roughly 100 feet from the bobbing lifeboat, could see that the pirates had tied Phillips up.
In the early evening, they saw something else: One of the pirates was aiming at Phillips' back. The commander of the Bainbridge gave a split-second order for Navy snipers to fire.
All three pirates on the lifeboat were killed. Phillips was spirited to safety.
At the White House, Obama was in the residence when he took a telephone call from an aide: The standoff was over. Phillips was safe.