(CNN) -- Two pirates in Somalia vowed revenge Monday, after the U.S. military killed three pirates and freed a U.S. ship captain who had been held hostage for several days.

Crew members of the Maersk Alabama celebrate after hearing the Navy had rescued their captain from pirates.

The pirates told a Somali journalist that they were angered by the U.S. action, as well as a French raid Friday that killed two pirates and one hostage and freed four hostages.

"We have decided to kill U.S. and French sailors if they happen to be among our future hostages," said Abdullahi Ahmed, a member of a pirate group based at Harardhere, a coastal town in central Somalia.

President Obama said Monday the United States will confront pirates and hold them "accountable for their crimes."

Obama added that he is proud of the military's actions in rescuing Capt. Richard Phillips from his pirate captors.

Members of the U.S. Navy shot and killed three pirates who had been holding Phillips hostage in a lifeboat on Sunday evening, a military official said. The pirates seized Phillips after a failed attempt to hijack his ship, the Maersk Alabama.

For five days the pirates held Phillips in the lifeboat as U.S. Navy ships closed in and lingered nearby.

On Sunday, U.S. Navy snipers opened fire on the lifeboat after seeing one pirate point an AK-47 at the captain's back, the U.S. military said. The shootings occurred as one pirate was aboard the USS Bainbridge negotiating over Phillips' fate. Watch how SEALs shot three pirates »

Three pirates in the lifeboat were killed. Phillips was not hurt. He was taken to another U.S. Navy vessel, the U.S. military said, where he received a medical checkup and spoke by phone with his wife in the United States. Watch admiral tell how rescue went down »

Pirates in Somalia identified the slain men as Mohamed Ahmed Adawe, Nur Dalabey and Khalif Guled. Two of them -- Dalabey and Guled -- were among the "most experienced men" in a group that has hijacked seagoing vessels for money, Ahmed said.

They were killed two days after the French military freed four hostages, including a child, who had been held by pirates for nearly a week on the yacht, Tanit, off Somalia's coast. In that operation, a hostage and two pirates were killed, the French Defense Ministry said, while three pirates were captured. Watch how pirates roam a vast area of ocean »

The military actions angered Ali Nur, a pirate who is based in Gara'ad, a coastal village in the semi-autonomous region of Puntland, in northern Somalia.

"From now on, after the killings by the U.S. and France, we will add some harsher steps in our dealings with hostages, particularly American and French hostages," Nur told a journalist.

The U.S. military acknowledged Sunday that its actions to rescue Phillips could increase the risk of violence.

"This could escalate violence in this part of the world. No question about it," U.S. Navy Vice Adm. Bill Gortney told reporters.

Nur issued a warning to the United States.

"The killing of our boys was aggression, and the U.S. will see what they get from their operation," he said.

All About Pirates • Somalia