President Barack Obama said Wednesday that US special forces had carried out a daring pre-dawn raid in Somalia that rescued two hostages, including an American aid worker, held since October.

"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," Obama said in a statement issued bythe White House.

"This is yet another message to the world that the United States of America will stand strongly against any threats to our people."

Obama said he had personally authorized the mission on Monday in order to rescue Jessica Buchanan, who was kidnapped along with Poul Thisted, a Dane. The two worked for the Danish Refugee Council Demining Group.

The two were rescued unharmed after helicopter-borne US commandos swooped in on remote scrubland in central Somalia and battled the kidnappers, killing at least eight of them, according to a local Somali official.

US Defense Secretary Leon Panetta said in a statement that the two had been taken to a "safe location" where they would be evaluated before returning home.

He added that no US troops had been wounded or killed in the operation.

"This successful hostage rescue, undertaken in a hostile environment, is a testament to the superb skills of courageous service members who risked their lives to save others," Panetta said.

Obama appeared to have hinted at the mission as he walked to the podium to deliver his State of the Union address late Tuesday (early Wednesday in Somalia), when he told Panetta: "Good job tonight. Good job tonight."

In his annual address to the Congress Obama had praised the Navy SEALs team that killed Al-Qaeda chief Osama bin Laden in a daring raid in Pakistan last year, offering it as model of unity for bitterly-divided Washington.

The White House did not specify which special forces were behind Wednesday's raid, but a regional security source told AFP it was carried out by Navy SEALs.

Somalia has been among the most lawless and dangerous countries in the world since its last effective central government collapsed two decades ago, plunging the country into civil war.