President Barack Obama praised US Special Operations Forces who rescued two hostages in a a night-time helicopter raid on a pirate hideout in Somalia.
Nine of the kidnappers were reported killed in a mission that President Barack Obama said he personally authorised.
Two aid workers, American Jessica Buchanan and Dane Poul Hagen Thisted, were freed and "are on their way to be reunited with their families", said The Danish Refugee Council.
The raiders came in very quickly, catching the guards as they were sleeping after having chewed the narcotic leaf qat for much of the evening, said a pirate named Bile Hussein.
He said he was not present at the site but had spoken with other pirates who were.
A second pirate who gave his name as Ahmed Hashi said two helicopters attacked at about 2am about 12 miles (20kms) north of the Somali town of Adado where the hostages were being held.
Buchanan, 32, and Thisted, 60, were working with a de-mining unit of the Refugee Council when they were kidnapped in October.
The US military confirmed that nine kidnappers were killed.
"Last night's mission, boldly conducted by some of our nation's most courageous, competent, and committed special operations forces, exemplifies United States Africa Command's mission to protect Americans and American interests in Africa," said Gen Carter Ham, commander of US Africa Command.
Obama seemed to refer to the mission before his State of the Union address in Washington earlier.
By then it was already Wednesday morning in Somalia. As he entered the House chamber in the US Capitol, Obama pointed at Defence Secretary Leon Panetta in the crowd and said, "Good job tonight."
"As Commander-in-Chief, I could not be prouder of the troops who carried out this mission, and the dedicated professionals who supported their efforts," Obama said in a statement.
"Jessica Buchanan was selflessly serving her fellow human beings when she was taken hostage by criminals and pirates who showed no regard for her health and well-being," Obama said. "The United States will not tolerate the abduction of our people, and will spare no effort to secure the safety of our citizens and to bring their captors to justice."
A Western official said the helicopters and the hostages flew to a US military base called Camp Lemonnier in the Horn of Africa nation of Djibouti after the raid.
The timing of the raid may have been made more urgent by a medical condition.
"One of the hostages has a disease that was very serious and that had to be solved," Danish Foreign Minister Villy Soevndal told Danish TV.
The Danish Refugee Council said both freed hostages are unharmed "and at a safe location."
The two aid workers appear to have been kidnapped by criminals - and not by Somalia's al-Qa'ida-linked militant group al-Shabab.
Several hostages are still being held in Somalia, including a British tourist, two Spanish doctors seized from neighbouring Kenya, and an American journalist kidnapped on Saturday.