U.S. Navy SEAL Team
U.S. Navy SEAL Team Reuters

US military freed two hostages held captive in Somalia, during a night raid that killed at least nine pirates.

The two hostages, a 32-year-old American woman and a 60-year-old Dutch man were kidnapped in Somalia three months ago but have now been freed officials say.

The overnight raid involved US military helicopters and US Navy seals.

Despite a shoot-out the two aid workers who had been working for the Danish Demining Group when they were abducted were both safe.

The Danish Refugee Council confirmed Jessica Buchanan and Dane Poul Hagan Thisted, were freed "during an operation in Somalia."

In a separate statement, the group added the hostages ""are on their way to be reunited with their families."

US President Obama appeared to refer to the mission on Tuesday night, after he told Defence Secretary Leon Panetta as he entered the House chamber in the US Capital "good job".

A western official told the Associated Press the hostages had been flown to a U.S. military base called Camp Lemonier in the Horn of Africa nation of Djibouti.

According to sources the criminals behind the two aid workers' abduction are not part of the Al-Shabab group.

A pirate who spoke to reporters at the scene of the raid said at least nine pirates had been killed in the operation.

A spokeswoman at the Pentagon had no immediate comment.

The raid came as last week a U.S. drone strike killed an al-Qaida official of Lebanese origin who had been fighting with al-Shabab insurgents in the outskirts of Mogadishu.

Bilal al-Berjawik, who was a British resident had previously fought in Afghanistan and left for Somalia in 2006.

He joined al-Shabab and helped oversee recruitment and tactics for the group.

Al-Berjawik is the fourth senior al-Qaeda- linked commander working for al-Shabab.

The armed radical group has been fighting the weak UN-backed Somalia government for years.

While Mogadishu is now in the hands of the government, al-Shabab still maintains control over various parts of the country.