The new American commander in Afghanistan, Gen. Joseph F. Dunford Jr., promptly issued an apology and said the killings were an accident.

The victims, Toor Jan, 11, and Andul Wodood, 12, were brothers and had been walking behind their donkeys in the Shahed-e-Hasas district of Oruzgan Province when the helicopter fired on them, according to Afghan officials in the district. The two donkeys were killed as well.

General Dunford said that coalition forces had opened fire on what they thought were insurgent forces, and killed the boys by accident. "I offer my personal apology and condolences to the family of the boys who were killed," General Dunford said. "We take full responsibility for this tragedy."

There was some disagreement about the presence of Taliban in the area and about the details of the episode.

Haji Mohammad Esmail, head of the district shura or council, said the area was "fully under government control," and that "we haven't seen any engagement in the area and nor is the area threatened by the Taliban."

Abdullah Himat, a spokesman for the provincial government in Oruzgan, in southern Afghanistan, said that while the shooting was a mistake, there had been Taliban presence in the area and insurgents had opened fire on the helicopter. Both Australian and American soldiers were involved in the episode, he said.

Fareed Ayal, the spokesman for the provincial police chief, said the helicopter was hunting for Taliban by tracking their radio signals when the killings took place. "There wasn't any engagement with the Taliban, it was just a mistake that they have killed the two boys at an area where they thought they detected a Taliban radio signal," he said.

The episode was the second airstrike to kill civilians since General Dunford assumed command in February. In Kunar Province in eastern Afghanistan, up to 11 civilians were killed, including 5 children, when airstrikes were used to destroy two homes.

That attack, which included Afghan forces on the ground, led President Hamid Karzai to forbid Afghan units from asking for airstrikes by coalition air forces. The Afghans have little air ability of their own.

General Dunford met with Mr. Karzai after the episode in Kunar and expressed his "personal condolences" for the civilian deaths.

The coalition last year imposed strict rules limiting the use of airstrikes in areas where civilians are present.

Taimoor Shah contributed reporting from Kandahar, Afghanistan.