A NATO air raid in eastern Afghanistan has accidentally killed five Afghan soldiers, officials say.

NATO offered its condolences for Thursday's deaths and pledged action to avoid further mistakes, but President Hamid Karzai has often seized on botched raids to launch bitter criticism of the international military effort in Afghanistan.

"At 3:30am this morning, due to a NATO air strike in Charkh district, Logar province, five service members of the Afghan national army were martyred and eight others were wounded," Zahir Azimi, Afghanistan's Defence Ministry spokesman, said on his Twitter account.

Khalilullah Kamal, Charkh district governor, told AFP news agency he had visited the site of the attack, which he said was from a US drone.

"The post is totally destroyed," he said. "The Americans used to be in that post but since they left, the ANA [Afghan national army] took over. The post is on a hilltop. The attack was conducted by drones."

NATO's International Security Assistance Force (ISAF) issued a statement confirming that at least five Afghan soldiers had been killed accidentally.

"An investigation is being conducted at this time to determine the circumstances that led to this unfortunate incident," it said.

"Our condolences go out to the families of the ANA soldiers who lost their lives and were wounded ... we will determine what actions will be taken to ensure incidents like this do not happen again."

An ISAF source told Reuters news agency that the soldiers were bombed because they were mistaken for insurgents.

"The aircraft engaged suspected insurgents on a ridge overlooking Nawer village," the source said, adding that the victims were later identified as soldiers.

'Extreme anger'

Karzai, who is due to stand down after a presidential election on April 5, in an interview this week expressed his "extreme anger" at the US as it prepares to end its 13-year war in his country.

Karzai was on a state visit to Sri Lanka, and there was no immediate comment from the palace.

NATO's fleet of fighter jets, attack helicopters, unmanned drones and transport aircraft have supported ground troops in operations against the Taliban.

Live Box 201239113414952721

But while air strikes have been an important weapon in the fight against the fighters, they have also proved hugely controversial since they have led to numerous civilian deaths.

Civilian casualties have been one of the most sensitive issues of the war and Karzai has often used accidental shootings and misguided air strikes to berate foreign countries and stir public anger.

In January the president, who has ruled since the fall of the Taliban in 2001, accused the US of killing seven children and a woman in an air raid in central Afghanistan.

Late last year Karzai made a surprise decision not to promptly sign a bilateral security agreement (BSA) with the United States, leading to the threat of a complete withdrawal of NATO troops by the end of 2014.

The BSA would see several thousand US troops remain in Afghanistan to provide training and assistance in the battle against the Taliban after the NATO combat mission ends in December.

Signing the agreement is also a precondition for the delivery of billions of dollars in Western aid.

Source: Agencies