Smoke raises after an explosion at the Defense Ministry complex in Sanaa, Yemen, on Dec. 5, 2013.
(Photo: Mohammed Hamoud, AP)
(CNN) -- It's something you don't often hear from the leaders of a terrorist group known for violence: We're sorry.
But that's just what the head of al Qaeda in the Arabian Peninsula said in a video message Sunday, apologizing for a hospital attack in Sanaa earlier this month that left dozens of people dead.
The attackers were directed not to assault the hospital or mosque in an attack against a Yemeni Ministry of Defense compound on December 5, but one fighter made a mistake and attacked the hospital, leader Qassim Al-Raimi says in the video.
"We confess to this mistake and fault. We offer our apologies and condolences to the families of the victims," Raimi said in the video, which was published by al Qaeda media outlet Al-Malahim. "We did not want your lost ones; we did not target them on purpose. This is not of our religion or our morals."
It's unusual to see "such a direct, fast, public apology" from al Qaeda, CNN National Security Analyst Peter Bergen said.
"Al Qaeda leaders seem to be waking up to the fact that if they position themselves as the defenders of Muslims, their large-scale killing of Muslim civilians needs to stop," Bergen said.
The apology comes after Yemeni government officials released surveillance video showing the hospital under attack.
The surveillance footage showed patients nervously looking out of the hospital windows, then running after an explosion.
In another clip, patients and staff huddle in a hallway. They watch as an attacker walks calmly toward them, activates an explosive and lobs it in their direction.
"We saw what the Yemeni channel broadcast: a gunman entering a hospital . ... We did not order him to do so, and we are not pleased with what he did," Raimi said. "Moreover, it wronged us and pained us, because we do not fight in this manner."
The U.S. government has designated al Qaeda in the Arabian Peninsula as a foreign terrorist organization and says the group has orchestrated "numerous high-profile terrorist attacks."
Sunday's apology, though rare, isn't the first time al Qaeda or its affiliates have apologized.
In November, Syrian rebels with al Qaeda ties apologized for mistakenly beheading a wounded rebel fighter after assuming he supported Syrian President Bashar al-Assad.
In 2009, an al Qaeda spokesman released a video messageoffering condolences to "unintended Muslim victims" killed in attacks.
And in 2007, Bergen said, former al Qaeda chief Osama bin Laden said that Muslim victims killed by al Qaeda in Iraq "are not the intended targets."
Behind the scenes, Bergen said, leaders of the group have expressed concerns about the impact such attacks would have on the group's reputation.
"We know from the documents recovered at the bin Laden compound in Abbottabad by U.S. Navy SEALS in May 2011, al Qaeda's leaders were often writing to each other privately and also to groups they are associated with about the need to minimize civilian (Muslim) casualties and often wrote about the damage to the al Qaeda brand that killing civilians had achieved by al Qaeda operations in Iraq," Bergen said. "But the straightforward public apology ... is a new development."
In Sunday's message, Raimi said the group would financially compensate families of victims in the hospital attack.
But the militant leader also stressed that the group's fighters wouldn't shy away from going after targets that have ties to American drones. That's why they hit the Defense Ministry compound that day, he said.
Since the attack, Yemeni government officials have repeatedly stated there are no drone operations based at the compound.
Raimi said places that help American drones by spying, providing information or offering intelligence are legitimate targets.
"We have a long list of these places. In case they continue, we will continue. We will reach them, because we defend ourselves," he said. "We made a mistake. We accept responsibility and we are continuing with our Jihad."
CNN's Atika Shubert and Mohammed Jamjoom contributed to this report.