Officials say they did not know soon-to-be-freed South African teacher Pierre Korkie was at the site with Luke Somers

US officials have defended the commando raid in south Yemen early on Saturday that led to the deaths of two hostages, saying they did not know the soon-to-be-freed South African teacher Pierre Korkie was being held at the site they attacked.

Korkie and a US photojournalist, Luke Somers, were in the same room and were apparently killed by their captors when a US special forces squad was within 100 metres of their mountain compound.

A senior US administration official said intelligence experts had concluded, before the raid, that two hostages were being held side-by-side. “One was assessed to be Luke Somers,” the senior US official told the Guardian. “We did not know who the second hostage was.”

South Africa said it did not want to assign blame for Korkie’s death. “This is no time for finger pointing,” said a foreign ministry spokesman, Nelson Kgwete. “We are working with the government of the United States, as well as the government of Yemen, to ensure that we bring finality to this tragic incident.”

Local people said 11 people had died, including a woman and a 10-year-old child. The US said five militants had died, while others escaped.

The raid was launched after the US military concluded Somers was in imminent danger. An earlier attempt to rescue him on 25 November had led al-Qaida’s affiliate in Yemen to threaten to kill the British-born American, whom they had held for much of the past 18 months after he was seized in the capital, Sana’a, reportedly by tribal figures who later sold him on.

While Somers’ fate had remained unclear, a South African charity said it had been close to finalising a deal to free Korkie, who was seized along with his wife, Yolande, by al-Qaida in May 2013. The couple had been in Yemen for four years with two teenage children; he worked as a teacher and she did relief work. Yolande was released without ransom in January after negotiations conducted by Gift of the Givers, a South African charity.

The charity said on Saturday: “The psychological and emotional devastation to Yolande and her family will be compounded by the knowledge that Pierre was to be released by al-Qaida tomorrow.”

The charity’s head, Imtiaz Sooliman, said mediators from a tribe in Yemen had convinced al-Qaida to hand over Korkie for a “facilitation fee” of $200,000 (£128,000) after dropping a $3m ransom demand. Korkie’s family and friends were able and willing to pay.

Tribal leaders met in Aden on Saturday morning “and were preparing the final security and logistical arrangements, related to hostage release mechanisms, to bring Pierre to safety and freedom”, Sooliman continued. “All logistical arrangements were in place to safely fly Pierre out of Yemen under diplomatic cover, then to meet with family members in a ‘safe’ country, fly to South Africa, and directly to hospital for total medical evaluation and appropriate intervention.”

Such was his confidence that last week Sooliman had told Yolande: “Pierre will be home for Christmas.”

Sooliman declined to criticise the US intervention, however. “I can’t hold anything against them because any government would act in the interests of their own people. I’m not sure if they knew Pierre was there or not. I can’t blame anybody. This is war and it mostly doesn’t have good outcomes.”

The timing was unfortunate, he continued. “We were not even sure if [the two men] were in the same place.”

Korkie’s widow wrote to Sooliman on Sunday: “We are devastated but I also know you all are devastated. You said in your media statement you salute me: but I wish to return this salute to you and Anas [Gift of the Givers’ Yemen project director] and the tribes. Please accept our deep appreciation for your immeasurable commitment, as well as to Anas and the tribes.”

The US official said Washington “had no knowledge” of the agreement negotiated between the charity and a Yemeni tribe.

US officials were quick to dismiss suggestions the men were caught in the cross-fire. The outgoing defence secretary, Chuck Hagel, speaking on a visit to Kabul, said: “This mission, in which there will be more detail forthcoming, was extremely well executed. It was a very dangerous and complicated mission. But like always in these efforts, there is risk.”

There is strong, bipartisan opposition in Washington to making ransom payments to terrorist groups, and politicians on both sides expressed their support for Obama’s decision to conduct the raid. However, South African’s biggest opposition party, the Democratic Alliance (DA), called on the government to demand an explanation from Washington over its timing.

Stevens Mokgalapa, the shadow foreign minister, said: “The DA believes that the South African government must urgently engage with American representatives to get to the bottom of the circumstances that led to Mr Korkie’s death, reportedly a day before his captors intended to release him.”

News of the deaths was still sinking in in Sana’a. Baraa Shiban, an activist who campaigns against US counter-terror policy in Yemen and met Somers during Yemen’s 2011 uprising, said: “He was a victim of the same process that he himself was trying to advocate against. I knew his politics. He was anti-drones, he advocated for the Guantánamo families.” This, he said, made the way he died particularly difficult to bear. “It hurts that he got caught in the middle of this mess.”

“At the moment I don’t know who to be angry at,” Shiban said. “Is it the Americans or is it al-Qaida? It is a long time he has been kidnapped and suddenly AQ says that he has three days.”

American officials in Sana’a said trying to free Somers had been a wrenching process. “This has struck people hard,” an embassy employee said. “A lot of different people were working on this. They have been concerned with the Somers case for more than a year now. No one should be here. There’s no reason. It’s just too unstable. I don’t think that is going to change at all.”