Al-Qaeda in the Arabian Peninsula has offered a rare apology to the families of those killed in an attack on a military hospital earlier this month.
Qasim al-Raymi, its military leader, said a fighter had disobeyed orders and targeted medics and patients during the raid on the defence ministry compound in Sanaa that left 52 people dead.
Raymi acknowledged "our mistake and guilt" and offered to pay blood money.
However, he vowed that attacks against the Yemeni authorities would continue.
The group said it had targeted the ministry complex on 5 December because it contained rooms from where US drones were being operated.
Despite this, many of the victims of the assault were doctors, nurses and patients at the military hospital inside the compound. Seven medics from Germany, India, the Philippines and Vietnam were among the dead.
There was widespread public outrage after state television broadcast CCTV pictures showing a gunman wandering the corridors and wards shooting unarmed people. At one point, he was filmed walking up to a group of patients, then calmly tossing a grenade into their midst.
In a video posted on jihadist websites by AQAP's media arm, Raymi said the nine attackers had been told in advance not to enter the hospital nor ministry's compound's place of prayer, but that one of them had done.
"Now we acknowledge our mistake and guilt," he added. "We offer our apology and condolences to the victims' families. We accept full responsibility for what happened in the hospital and will pay blood money for the victims' families."
Raymi said that despite the error, "we are continuing our jihad". He warned that AQAP would attack any other military posts that "co-operate with the American drones by spying, planting chips, providing information or offering intelligence advice".
As of October, the US military and CIA were estimated by research groups to have carried out 81 targeted killing operations in Yemen, most of them since 2009. The strikes - by drones, warplanes and cruise missiles - are thought to have killed at least 473 combatants and civilians.