Capt. Richard Phillips, the kidnapped sea captain of a U.S.-flagged cargo ship, was rescued Easter Sunday after U.S. Navy snipers shot and killed three of his Somali pirate captors.

The 53-year-old was rescued after the commander of a nearby U.S. warship determined that his life was in "imminent danger," Navy Vice Admiral Bill Gortney said Sunday.

"We had very clear guidance and authority that if, at any time, the on-scene commander felt that Captain Phillips' life was in danger, that they could take action to make sure that it was not," Gortney told reporters in a Sunday afternoon phone interview.

"That is what occurred at this particular time."

A fourth pirate, who was not on the lifeboat but participated in negotiations to free Phillips, is now in military custody.

Dean Boyd, a U.S. Justice Department spokesperson, said prosecutors are deciding whether to bring a case in the United States.

The brief firefight that led to Phillips' rescue involved U.S. Navy SEALs and followed a period of hostage negotiations with the pirates, Gortney said.

A U.S. Navy spokesperson said Phillips had been freed at approximately 7:19 p.m. local time, in the Indian Ocean off the coast of Somalia.

Lt. Nathan Christensen said Phillips was initially flown to the USS Bainbridge, before being taken to the USS Boxer for a medical exam.

Later Sunday, Phillips released a statement thanking the people that had worked to free him from a lifeboat where he had been held hostage since Wednesday.

The timetable

U.S. ships and helicopters had descended on the area Sunday as a tense standoff on the high seas entered its fifth day.

The pirates took Phillips hostage late Wednesday during a failed hijacking of the U.S.-owned Maersk Alabama, a cargo ship that was carrying aid for people in Somalia, Rwanda and Uganda.

The pirates held the ship for several hours on Wednesday before being overpowered by crew members.

When the pirates abandoned the ship, they took Phillips with them as a hostage in a lifeboat.

The lifeboat was then surrounded by American warships, including the USS Bainbridge, the USS Hallyburton and the USS Boxer, all of which are loaded with helicopters, munitions and medical supplies.

On Saturday evening, a Pentagon official had said that negotiations to secure Phillips' release were ongoing.

However, other reports suggested that talks broke down late Saturday night when Somali elders, who had been speaking with American officials via satellite phone, objected to the Americans' insistence that the pirates be arrested.

Experts believed that the pirates wanted to reach shore, where they could hide their hostage and begin negotiations for a multi million-dollar ransom.

CNN reporter Stan Grant said Sunday that in the last year alone, Somali pirates have been able to net tens of millions of dollars by capturing cargo and other vessels off the Somali coast and demanding high ransom payments for hostages.

Somali pirates are relatively free to conduct such activity with little fear of retribution, Grant told Â鶹´«Ã½net, because Somalia has been without a central government since 1991.

Rebel factions have battled for control of the country since that time, and it is within that lawlessness that the pirates are able to operate.

It is believed that pirates have about 200 hostages currently hidden in Somalia.

Pirate negotiations

Piracy expert Nick Davis of Gulf of Aden Group Transits said the fact that three pirates were killed may have negative implications for future hostage negotiations.

To date, pirates have taken hundreds of hostages and no one has been hurt, he said.

"They've held over 1,000 crewmen in the last year and over 50 ships, and suddenly we're popping off the Somalis in their boats," Davis told Â鶹´«Ã½net on Sunday afternoon in a phone interview from London.

"That could send very, very poor signals throughout the sort-of pirate network."

Jamac Habeb, a 30-year-old Somalian pirate who spoke to The Associated Press, said "our friends should have done more to kill the captain before they were killed. This will be a good lesson for us."

Even Gortney acknowledged that the rescue of the U.S. sea captain could affect future operations.

"This could escalate violence in this part of the world, no question about it," he said.

Meanwhile, the 19 remaining crew members of the Alabama reached shore late Saturday, bringing their ship safely into Mombasa harbour in northeast Kenya.

The crew spoke to FBI agents about the pirate attack before detailing for the media exactly what happened on Wednesday afternoon.

Crew member ATM Reza said the pirates boarded the Alabama with hooks and ropes, firing guns into the air.

Phillips instructed his crew to lock themselves in a cabin and then surrendered himself to the pirates.

The crew had managed to take one pirate hostage during the ordeal but released him in the hope that the pirates would release Phillips.

Instead, the pirates fled the ship with the captain.

With files from The Associated Press