A NATO airstrike killed five Afghan soldiers and wounded at least 17 others early Thursday in the eastern province of Logar.

A spokeswoman for the U.S.-led international forces in Afghanistan said the troops were accidentally killed during a military operation.

She said an investigation is ongoing to determine the cause of the incident, and sent condolences to the families of those killed.

A spokesman for Afghan President Hamid Karzai condemned the attack and said an investigation had been ordered.

The NATO-led coalition said soldiers were accidentally bombed during an operation intended to support Afghan security forces in the province because they were mistaken for insurgents.

It said NATO aircraft engaged suspected insurgents on a ridge overlooking Nawer village, adding the victims were later identified as Afghan army soldiers.

The strike comes during a low point in ties between the United States and Mr. Karzai, who has criticized airstrikes that kill Afghans.

U.S. officials say if Mr. Karzai does not agree soon to a long-delayed deal on a lasting American military presence, all U.S. troops will be pulled from the country in December.

Mr. Karzai is set to leave office following elections on April 5.