TEL AVIV, Israel — The Israeli military said Sunday that an investigation into its soldiers’ deadly attack on medics in the southern Gaza Strip last month had identified “several professional failures” and that a commander would be dismissed.

The military had previously acknowledged carrying out the attack in Rafah that killed 14 rescue workers and a United Nations employee who drove by after the others were shot. But it offered shifting explanations for why its troops fired on the emergency vehicles and said it was investigating the episode, one that prompted international condemnation and that experts described as a war crime.

On Sunday — nearly a month after the attack — the military released a statement summarizing its findings.

“The examination identified several professional failures, breaches of orders, and a failure to fully report the incident,” it said.

The shootings of the rescue workers, the military said, resulted from “an operational misunderstanding” by troops on the ground “who believed they faced a tangible threat from enemy forces.” The firing on the U.N. vehicle, the statement said, constituted “a breach of orders” in a combat setting.

In a more detailed briefing for reporters shortly after the statement was released, the head of the investigating team, Yoav Har-Even, a major general in the reserves, described the killings as “a tragic and undesired result of a complex operational situation,” compounded by some serious errors in the actions of the forces on the ground.

The chief military spokesperson, Brig. Gen. Effie Defrin, said the military “regrets the harm caused to uninvolved civilians.” But he also blamed Hamas, saying it creates a “problematic gray zone” by routinely exploiting civilian infrastructure. He said it used ambulances to transport fighters and weapons.

Military officials had initially asserted, repeatedly and erroneously, that the vehicles were “advancing suspiciously” toward the troops “without headlights or emergency signals.”

The military backtracked on that assertion a day after The New York Times published a video, discovered on the cellphone of one of the dead paramedics, that showed the clearly marked vehicles flashing their lights and coming to a halt before the attack.

The commander of the brigade involved will receive a reprimand “for his overall responsibility for the incident,” it said, while the battalion’s deputy commander will be dismissed because of his responsibilities as the field commander at the time “and for providing an incomplete and inaccurate report during the debrief.”

The Israeli military’s first account said that nine of those killed had been operatives for Hamas or another militant group, Palestinian Islamic Jihad. It later revised that count, saying that six of them were Hamas operatives, without providing evidence. The military acknowledged Sunday that none of the 15 dead aid workers had been armed.