PATROL BASE PUL-I-ALAM, Afghanistan — The top commander of U.S. and NATO troops in Afghanistan offered a somber apology Friday in an eastern province where officials say 18 civilians — half of them children — were killed in a coalition airstrike this week.

Marine Gen. John Allen spent several hours with local Afghans to express his regrets about Wednesday’s pre-dawn raid to capture a Taliban operative in Baraki Barak district of Logar province.

“We take these deaths very seriously and I grieve with their families,” Allen told the provincial governor. “I have children of my own, and I feel the pain of this.”

Hours after Allen’s visit, the U.S.-led coalition issued a statement saying that it had completed its initial assessment of the operation and confirmed that “in addition to the insurgents killed during the operation, it’s also responsible for the unintended, but nonetheless tragic, death of Afghan civilians.”

Nighttime raids on militants taking cover in villages are a major irritant in Afghan President Hamid Karzai’s relationship with the international military coalition. Karzai says the raids put civilians at risk of injury or death. Military officials say such operations are key to capturing and killing Taliban leaders.

Allen met first with the governor, Mohammad Tahir Sabari. The two sat in overstuffed chairs in Sabari’s office, each cupping the other man’s hands in his own.

“I wanted to come immediately to see you after this tragedy and to offer you, personally, my apologies, my condolences and my regrets,” Allen told the governor.

The men then moved to a large conference room where about 35 people — relatives of the victims, members of the provincial council, Afghan army and police officials and members of parliament — listened stone-faced as Allen repeated his apology.

“I have come here today to apologize to you all for the tragedy that occurred two days ago,” the general said.

The governor said the anger that boiled over in the province after the airstrike had simmered, but that the residents of Logar want the military to take punitive action against those responsible for the deaths.

“We are accepting his apology, but the people who did this — whether they were foreigners or Afghans — should be punished,” the governor said. “If they are not punished, the apology means nothing and there will be no result.”