The decision by the top U.S. commander here to stop using aircraft to bomb Afghan homes, while striking in tone, actually represents only a subtle shift in the ground realities of the war against the Taliban, according to U.S. military officials in Kabul.

On Monday, commanders in Kabul were refining the language of a new order that is intended to make airstrikes on Afghan homes a last resort to be used only to protect troops in danger. Over the weekend, Gen. John R. Allen met with Afghan President Hamid Karzai, who was angered by a U.S. airstrike last week that killed 18 Afghans in Logar province, and pledged to address the issue.

“What we have agreed is that we would not use aviation ordnance on civilian dwellings,” Allen told reporters in Kabul on Monday. “Now that doesn’t obviate our inherent right to self-defense. We will always . . . do whatever we have to do to protect the force.”

U.S. military officials said that as a matter of practice, bombing Afghan homes already has been a last resort for troops involved in firefights but that the new restrictions will spell that out more clearly. Of the more than 1,300 airstrikes launched this year, 32 damaged civilian dwellings, and five resulted in civilian deaths, according to U.S. military statistics.

“It’s not something that we do very often, for obvious reasons, because we’re trying to protect the population, and there’s concern over civilian casualties,” Maj. Gen. Sean MacFarland, the coalition’s deputy chief of staff for operations, said in an interview. He said the restrictions on air power do not amount to a change in the overall rules of engagement. “Air is still on the table; it’s just not the preferred method.”

Karzai has repeatedly demanded that U.S. forces take greater precautions to avoid collateral damage to Afghans. Civilian deaths have been a major source of tension in the deteriorating bilateral relationship in recent years. The issue flared again last week, when a nighttime raid targeting Taliban fighters ended up killing several civilians who had come to the home of two brothers, Basir and Qayum Akhunzada, in Logar province to attend the wedding of Basir’s daughter.

According to an account by U.S. military officials, Taliban fighters inside the home began to fire as American and Afghan troops approached, wounding two U.S. soldiers and one Afghan soldier. The troops attempted to draw out the insurgents, but they refused to emerge. So the troops called in aircraft to drop a 500-pound bomb on the house. Afghan officials said 18 civilians died, but U.S. military officials said some of the dead included insurgents.

“I’ve looked at the film, and as an infantryman myself, I will tell you that they backed off, they tried every measure, they tried call-out, they did the proper steps in trying to clear the building and were repelled back by insurgent fire,” said Brig. Gen. Stephen M. Twitty, a U.S. military spokesman in Kabul.

But Afghan officials remained dismayed by the violence. Karzai’s office said Afghans were not consulted before the airstrike. A Karzai adviser, Shahzada Massoud, was part of the Afghan delegation that traveled to Logar to investigate the incident. Massoud said U.S. troops showed him a video in which he could see a man firing from the roof of the house, but he added, “You could also see women and children clearly.”

The airstrike “was not acceptable at all,” Massoud said. “When we came back and presented our report to President Karzai, he was very, very angry.”

The number of civilians killed or wounded by coalition troops has dropped this year. As of Saturday, NATO troops had caused 124 civilian casualties, compared with 256 in the same period last year. The Taliban has inflicted greater harm: 1,106 civilian casualties this year, according to military statistics.

The new airstrike restriction means that troops will use other means to get at insurgents holed up inside homes, U.S. military officials said. They would not elaborate on those new tactics, which are part of the classified order.

“The thing to keep in mind is we’re not turning civilian compounds into safe havens for the enemy,” MacFarland said. “We have developed other means to go into these compounds and get these guys out of there.”

Special correspondent Javed Hamdard contributed to this report.