“Obama made the wrong decision, and signed the death warrant” of American Luke Somers, who was killed along with South African teacher Pierre Korkie, Al-Qaeda in the Arabian Peninsula (AQAP) official Nasser bin Ali al-Ansi said in a video released Thursday.

Ansi said AQAP was seeking the release of detainees held by the US, including the blind Egyptian sheikh Omar Abdul Rahman and Pakistani Aafia Siddiqui, jailed on terrorism charges.

Somers and Korkie were shot and fatally wounded by their captors on Saturday when American commandos stormed an Qaeda hideout where they were being held in southeastern Yemen.

The raid to free Somers, 33, came two days after the kidnappers issued a video in which they threatened to kill him within 72 hours unless Washington met unspecified demands.

Ansi said that Obama had ordered the assault “despite our warning that he should not do anything foolish”. He said the operation had cost the lives of both Somers and Korkie, “for whom negotiations were under way to release him.”

The failed operation came just a day before Korkie, 57, was due to be freed under a deal with the kidnappers, although the US ambassador to South Africa has said Washington was unaware of his impending release.

“Obama made a decision that caused things to take a completely different turn to what we wanted,” Ansi said. “He could have avoided the fate of this hostage which was the inevitable consequence of the military solution,” he added.

Somers was seized in the Yemeni capital in September 2013. Korkie was abducted together with his wife in May 2013, but she was released in January.

AQAP, considered by Washington as the most dangerous affiliate of Al-Qaeda, has exploited instability in the impoverished country since a 2011 uprising forced president Ali Abdullah Saleh to step down.

In recent years AQAP has carried out a growing number of abductions, with several hostages still in captivity.

Denouncing US policy towards the “Muslim nation,” Ansi warned that “the lives of all Americans are in danger, in or outside the United States, in the air, on land and at sea.”

He added: “Can your nation dream of security when it lives in such a situation? You cannot dream of security until security is a reality in Palestine and all Muslim countries.”

Yemen is a key ally of the United States, allowing Washington to carry out a longstanding drone war on its territory against AQAP.

The Al-Anad air base in the southern province of Lahij - where Yemen has acknowledged the deployment of US personnel to gather intelligence for drone strikes - was targeted early Thursday by mortar rounds, a military source said.