WASHINGTON — The sun had yet to rise over the northern Syrian village of Al Tokhar on July 19 when a U.S. airstrike obliterated much of the town, leveling adobe buildings and killing families as they slept.

Soon grisly photos of bloody corpses and grieving survivors began appearing on social media, alerting the world to the carnage.

A Pentagon statement issued Thursday said the bombing of Al Tokhar killed about 100 Islamic State fighters. But it also said that up to 24 civilians “who had been interspersed with combatants” were mistakenly killed in the attack.

That total is far less than the 100 or so civilian casualties that independent Syrian monitoring groups blamed on the airstrike. But it's still the worst civilian death toll from a single U.S. raid since the war against Islamic State began in mid-2014.

The case, days after the Pentagon acknowledged a coalition air raid in September had killed dozens of Syrian-backed troops in error, highlights the limits of an air war that relies on highly trained crews and the most high-tech aircraft, targeting and munitions in history.

Six additional botched airstrikes have killed 30 civilians in Iraq and Syria this year, according to the Pentagon, bringing the official civilian death toll from U.S. mistakes to 173 since mid-2014.

Several hundred civilians have been reported killed in U.S. airstrikes in Pakistan, Afghanistan, Yemen and Somalia in recent years, though hard figures are difficult to pin down.

In all, the Pentagon has received 257 allegations of civilian casualties since mid-2014. It has ruled 181 were not credible. Several officers and crew members have been disciplined, but none has been prosecuted for violating the laws of war.

U.S. officials say the death toll, while regrettable, is still remarkably low given the relentless pace of bombing by coalition aircraft: More than 60,000 munitions have been dropped in Iraq and Syria over the last 30 months.

“Do we make mistakes? Sure we do, but it isn't deliberate,” said retired Air Force Lt. Gen. David Deptula, now dean of the Mitchell Institute for Aerospace Studies in Arlington, Va. “I can promise you: There isn't a military in the world that takes the time and care to avoid civilian casualties like the United States.”

Micah Zenko, a senior fellow at the non-partisan Council on Foreign Relations, said: “Even though the U.S. military is unparalleled in their targeting processes, bad things happen. The errors come from both the ground and the sky. Advances in technology may improve processes, but they can never be made perfect.”

On Sept. 10, for instance, U.S. warplanes targeted an Islamic State tactical unit in the militants' Syrian stronghold of Raqqa. It instead killed five civilians, according to a Pentagon investigation.

A week later, an hour-long air raid on a garrison in the eastern Syrian town of Deir el-Zour mistakenly killed about 60 Syrian government-backed troops, rather than Islamic State fighters.

Pentagon investigators later determined that an analyst's warning that surveillance did not indicate that Islamic State was at the camp was not forwarded to the commanders who authorized the attack.

Norton Schwartz, former Air Force chief of staff, said the Obama administration is “clearly uncomfortable with the loss of American lives in combat” and has tried to “thread to the needle” by carrying out complex operations primarily from the sky.

“Without eyes on the target, you open yourself up to false information,” he said. “The Air Force will hit whatever we aim at. The question is whether it's the right target.”

The military was convinced it had identified the right target in Al Tokhar.

The village was near Manbij, a strategic border town then held by Islamic State but under siege from the rebel forces. Early on July 19, the alliance radioed they were being shelled.

U.S. and coalition commanders at the air operation center in Qatar responded by scrambling two A-10 attack jets and a B-52 bomber while a drone circled overhead.

Their attack was brief but deadly, according to Mohammad, who was reached in Al Tokhar on Facebook but did not want his last name used for safety.

“You could say there were 11 or 12 missiles,” he said. “On our house, two missiles fell.”

The Syrian Network for Human Rights, an independent group that tracks casualties in Syria, said up to 98 civilians were killed.

Special correspondent Nabih Bulos in Amman, Jordan, contributed.

william.hennigan@latimes.com