KABUL - In a confusing and deadly battlefield incident Tuesday, a firefight between two groups of Afghan and American security forces, followed by U.S. airstrikes, left six Afghan army soldiers dead and seven wounded, U.S. military officials here said Thursday. No Americans were reported harmed.

The chaotic events, in an insurgent-plagued district of northern Kunduz province, came after a series of incidents in recent months in which U.S. airstrikes unintentionally killed Afghan forces in battle zones. Combat has intensified as peace talks have faltered and the Taliban has launched a "spring offensive." Afghan security officials have vowed to respond in kind.

In Kunduz, U.S. bombings during fighting with Taliban forces have taken an especially high toll. In March one U.S. strike mistakenly killed about a dozen civilians, including children, U.N. officials reported. In 2015, an airstrike in Kunduz city during heavy ground fighting killed 42 people at an international hospital.

No details of Tuesday's incident were immediately available. It was not clear whether the Afghan army casualties were due in part to mistaken or deliberate "green on green" fire among Afghan forces, or whether they were solely the result of the U.S. strikes called in by the ground unit that came under attack.

In a statement, a U.S. military spokesman in Kabul said a joint patrol of U.S. and Afghan forces came under "an onslaught of machine gun fire" and "requested precision air support" in self-defense. "Unfortunately, the machine gun fire was coming from another group of Afghan security forces," he said.

The spokesman, Army Col. David Butler, said the operation had been "extensively planned and coordinated with U.S. and Afghan security forces to prevent an event like this from occurring. We regret the tragic loss of our Afghan partners." He said a joint U.S.-Afghan investigation would be undertaken to determine how the incident happened and "to help prevent future tragedies."

A spokesman for the Afghan Defense Ministry, Col. Mohammad Zubair Arif, said "six of our soldiers were martyred in the airstrike of foreign forces." He said that "government posts came under enemy attack, the airstrike was summoned for help, but instead our troop posts were hit."

Civilian officials in Kunduz said the area has endured many foreign military airstrikes, often leading to both civilian and military casualties.

"This is not the first time," said Amruddin Wali, chairman of the provincial council. "People do criticize such incidents. Some even say they are doing it intentionally." A spokesman for the provincial governor said the incident would be "fully investigated."

Dozens of deadly "insider attacks" against both Afghan and U.S. forces have also occurred in the past decade, as well as incidents of mistaken "friendly fire." Reports of insider attacks have declined since the number of U.S. troops was drastically reduced in 2014 and extra force protections were put in place.

But the toll of dead and wounded Afghan forces has remained high, along with that of civilians in combat zones, as both sides have stepped up efforts to seize or retake contested areas of the countryside. Casualties from airstrikes have continued, despite repeated statements by U.S. military officials after each incident that they would seek to prevent such problems in the future.

In an April report, the U.N. assistance mission in Kabul reported that civilian casualties were slightly down but that the greatest increase in such casualties this year had been those inflicted by pro-government forces, especially by aerial attacks.

In mid-May, U.S. airstrikes in Helmand province killed as many as 18 Afghan police during heavy fighting with Taliban forces. At the time, Butler said U.S. military personnel had worked with Afghan coordinators to ensure the targeted areas were clear of friendly forces. "Unfortunately, they were not, and a tragic accident resulted," he said, adding that U.S. officials were "examining the miscommunication to ensure it is not repeated."

On Thursday, a suicide bomber on foot detonated his explosives next to a police vehicle in eastern Jalalabad city, killing nine Afghan officers, officials said. No group has claimed responsibility for the attack, but the busy trading city and surrounding Nangahar province have been repeatedly targeted by both Taliban insurgents and militants from the Islamic State, an extremist Sunni Islam movement that has built a regional affiliate there despite being defeated in Syria and elsewhere.

In March, at least five Afghan soldiers were killed and 10 wounded in U.S. airstrikes in Uruzgan province while they were patrolling with American forces near an Afghan army checkpoint. U.S. military officials said they had conducted "precision self-defense airstrikes on people firing on Afghan and American forces" but that mistakes in coordination had occurred.

Local officials said a firefight broke out between Afghan and U.S. forces who believed they were under attack. A U.S. military spokeswoman called the incident "an example of the fog of war."

- - -

The Washington Post's Sharif Hassan contributed to this report.

This article was written by Pamela Constable, a reporter for The Washington Post.