Captain's Book Details How He Foiled and Infuriated Somali Pirates

When pirates attacked Capt. Richard Phillips' ship last April, he tried to fend them off by firing warning flares at them, popping up between bursts of fire from AK-47s to zing a fiery flare at them.

Phillips was hoping for a lucky shot that would ignite something in their skiff, but he kept aiming flares at the four pirates even after they were aboard the Maersk Alabama and were spraying the captain's bridge with gunfire.

He says that was his first mistake -- taking too long to retreat to a safe room where he could lock himself in and the pirates would be unable to maneuver the ship and would have no bargaining chips.

VIDEO: Captain Richard Phillips recounts his days at sea in "A Captains Tale."Play

In his new book "A Captain's Duty" Phillips recounts the harrowing ordeal at the hands four Somali pirates last April, and details for the first time what happened aboard the cargo ship and how he and his crew frustrated and fooled the pirates.

Phillips' account comes as pirate activity in the Indian Ocean appears to be escalating along with more attempts to fight off the pirates. Just this week, a South Korean warship is pursuing a supertanker grabbed by pirates that is loaded with $160 million worth of crude oil.

And Danish marines in a helicopter strafed a hijacked cargo ship Monday and then rappelled down lines to capture 10 pirates and reclaim the ship.

The hijacking of the Maersk Alabama on April 8, 2009, however, focused attention on the growing war with pirates for the way the largely American crew foiled their attempts to take control of the ship, and the pirates' failure to honor a prisoner swap by taking Phillips hostage in the ship's lifeboat.

The standoff ended four days later when Navy marksmen killed three of the pirates. That ending came as tensions in the little boat were heightening and the pirates taunted Phillips by telling him he was going to die and repeatedly aiming their unloaded weapons at him and pulling the trigger.

Phillips says he never knew when that "click" would turn to "boom."

The worst moment came after his failed bid to escape the lifeboat, jumping into the ocean at night and trying to swim to the USS Bainbridge a half a mile away. The pirates quickly came after him in the boat, but couldn't find him because he was now hanging on to the undersides of the boat and would duck under the water whenever he heard footsteps coming his way.

Capt. Phillips Foiled Pirates' Attempts to Talk to Mother Ship

At one point, he grabbed the head of a pirate who was peering over the side and tried to pull him into the water and drown him, but the pirate's yells alerted the others.

Eventually pulled aboard, the pirates were "absolutely bats**t furious that their million-dollar American hostage had almost gotten away," Phillips wrote.

They trussed him up and took turns beating him until they were exhausted. But even then, Phillips' reputation for being a funny guy won out. Describing the Somalis as slightly built and weighing possibly 135 pounds, he said the beating hurt, but was bearable.

"Honestly, my sister Patty hits harder," he wrote.

At the beginning of the pirate attack, the pirates surprised Phillips by the swiftness of their attack. As Phillips was popping peeks over the side of the ship to fire flares at them, he was startled and dismayed.

"I looked down at the water and couldn't believe what I saw. The pirates were lifting this beautiful long white ladder into the air. I thought, where in the hell did they that thing? It looked like something you'd get at Home Depot."

The ladder had hooks on top and Phillips said it looked like "this damn thing was custom-designed to take our ship."

Within minutes, pirates had control of the bridge, but the Alabama's crew locked themselves away in secret rooms and shut down the ship's engines and power supply.

In the next few hours, Phillips cut off the pirates' communication with their mother ship by changing the readings on the radar so that it would not show any ships in the area, which baffled the pirates. And he surreptitiously changed the frequency on the radio so they couldn't reach their colleagues over the air waves.

The captain also called their bluff when they threatened to kill a crew member if the rest of the crew didn't come out of hiding.

Stymied, the pirates became furious, but Phillips kept the tensions manageable by providing them with cigarettes, food and laughs. At one point, the pirates had loaded up with food from the galley and struggled to make it up the ladders with their load.

"You need some help?" Phillips asked, holding out his hands. "'Here, let me carry the gun.' He laughed," Phillips wrote, referring to the struggling pirate.

Increasingly frustrated at their inability to find the crew or gain control of the ship, the pirate leader went on his fourth search of the ship and on this trip he was captured by the Alabama's crew. The crew then tried to negotiate a deal, their hostage for their captain.

The negotiations were speeded along when the pirates heard Chief Mate Shane Murphy on the radio apparently telling a U.S. Navy ship there were four pirates on board.

"Roger that, this is the guided missile cruiser USS Virginia. Helicopters are launching," came the response.

There was no USS Virginia in the area. Both voices were Murphy's as he faked the conversation with the U.S. Navy.

The possibility of a U.S. warship heading their way made the pirates eager to strike a deal, but when the captured pirate was put into the lifeboat for the exchange, they pulled away from the Alabama without letting Phillips reboard his ship.

No Honor Among Pirates

If Phillips needed any more evidence that there is no honor among pirates, he watched as the leader divvied up $30,000 they took from the ship's safe. In dealing out the money, the leader created four piles, but in his pile put mostly $100 bills while dealing out $20s and $10s and $5s to his comrades.

Exasperated by Phillips constant challenges and wise guy remarks, the pirates wanted to know what tribe Phillips belonged to. They knew he was American, but insisted on knowing his tribe. So finally, Phllips told them "Irish."

"You trouble, Irish," one responded. "Yeah. You a problem."

After five days at sea, Phillips was beginning to wonder whether the U.S. Navy, which now had three ships shadowing the lifeboat and sending supplies to the pirates, was just going to watch him disappear on the Somali shore.

Exhausted from lack of sleep and the oven-like heat, and without the glasses he lost in his escape attempt, Phillips missed the encouraging sign that the Navy sent him. Included in a package of pop tarts and fish was a bottle of A-1 steak sauce. He thought it was a strange combo for fish, but then it was the Navy.

"I didn't find out until later, but a Navy crewman had written a message on the label: 'Stay strong, we're coming to get you.'"

The Navy kept its vow. After one pirate went aboard the ship ostensibly to negotiate a ransom, the other three began arguing among themselves. When they made the rare mistake of standing together away from Phillips, a volley from the Navy sharpshooters ended the ordeal.