KABUL, Afghanistan — Only two days after joint operations between American and Afghan forces were said to be returning to normal, five people — two Americans and three Afghans — were killed when a pitched battle broke out between soldiers of the two sides, American and Afghan officials said Sunday.


Afghan officials said that the clash on Saturday was a misunderstanding and that the Americans apparently attacked an Afghan National Army unit in error. A top coalition officer said the Americans were attacked first in what might possibly have been an insurgent attack. Nonetheless, he expressed regret for what ensued.


An initial statement from the NATO-led International Security Assistance Force, commonly referred to as ISAF, on Sunday described the episode as “a suspected insider attack,” which killed a foreign soldier and a civilian contractor. If so, that would bring to 53 the number of coalition forces killed in the so-called insider attacks this year.


Whatever happened, the episode clearly was another in a series of setbacks this year, and particularly in the last month, in relations between the American and Afghan militaries. It comes at a delicate moment, when all of the American surge reinforcements have only recently left the country, and NATO has been trying to transfer ever greater responsibility to a growing Afghan military.


Shahidullah Shahid, the spokesman for the governor in Wardak Province where the fighting occurred, said the deaths came “after a clash ensued between two sides following a misunderstanding.” An Afghan official, speaking anonymously because he was not authorized to release details, said that a mortar shell had landed amid the American unit, killing a soldier and a civilian contractor and wounding several others. The Americans thought it came from a nearby Afghan National Army checkpoint on a hill overhead and attacked it with small arms and rockets, killing three and wounding three of the seven soldiers there, the official said.


The Wardak provincial police chief, Abdul Qayoum Baqizoi, said the fight broke out when an Afghan soldier among seven soldiers at the checkpoint opened fire on the Americans; in the ensuing gun battle, three Afghan soldiers were killed, including the one who fired first. “We still don’t have a clear picture of what happened,” Mr. Baqizoi said. He quoted the lone Afghan soldier who was unhurt as saying, “ ‘I heard some noise and verbal argument and suddenly heard the shooting and then one of the coalition soldiers threw a hand grenade so I fled from the checkpost and hid myself behind our Humvee.’ ”


Significantly, according to Afghan officials, the American unit, which was relatively small in size and manning a temporary checkpoint in the Sayid Abad district, was not partnered with Afghan forces. The unit was conducting a biometric survey, in which details like fingerprints and eye scans are gathered from the local population, often at temporary checkpoints, in an effort to screen for insurgents.


Normally such operations would consist of American and Afghan forces working together, but in recent weeks the American military has issued orders that all joint operations with units smaller than a battalion (400 to 800 soldiers) need to be approved in advance by a general commanding one of the six military regions in Afghanistan. Most joint operations take place at small unit levels.


At a hastily convened news conference on Sunday to discuss the clash, the deputy ISAF commander, Lt. Gen. Adrian Bradshaw read a brief statement that did little to clarify what happened between the ISAF and Afghan National Army, or ANA, soldiers. “What was initially reported to have been a suspected insider attack is now understood to possibly have involved insurgent fire,” General Bradshaw said. “After a short conversation took place between ANA and ISAF personnel, firing occurred which resulted in the fatal wounding of an ISAF soldier and the death of his civilian colleague. In an ensuing exchange of fire three ANA personnel are reported to have died.”


“We deeply regret the loss of life in this tragic incident,” General Bradshaw said.


Asked if the restrictions on joint patrolling were a factor in Saturday’s clash, General Bradshaw did not respond to the question, saying instead that the restrictions were not a change in strategy but were prompted by increased caution about the reaction in a Muslim country to the incendiary video recently posted on YouTube that denigrated the Prophet Muhammad.


Insider attacks this year have increased greatly compared with 2011, when there were 35 over 12 months, arousing concern in the coalition, as well as in Western capitals. French forces announced that they were leaving by the end of next year, a year earlier than originally planned, after losing four of their soldiers in an insider attack in January.


In addition to restricting joint patrols by small units, the military has also required its forces to wear body armor and carry loaded weapons whenever they are in the presence of Afghan forces. And early in September training activities between Special Operations troops and new Afghan Local Police recruits were suspended because of several insider attacks involving the militia forces. While those restrictions remain in force, Pentagon officials on Thursday said that joint operations among smaller units were returning to normal levels because of expedited approvals by higher commanders.


A senior American military officer said recently that only a fourth of the insider attacks could be definitely linked to insurgent infiltration of the Afghan security forces, and another fourth were judged to have been caused by personal disputes. The rest, however, usually resulted in the death of the perpetrator and it was unclear what the cause was.


“If you visit people in the field who are working together closely, in thousands of interactions every day you see strong trusting relationships resulting in cooperative operations delivering success every day in the field,” General Bradshaw said at the news conference. “So whilst these incidents do represent the means by which the enemy seeks to drive a wedge between ISAF and our allies, the fact is they have not succeeded in doing this.”


Taliban insurgents routinely claim credit for insider attacks, saying the infiltrator intended to be killed in the attack.


The Afghan military has stepped up its screening of recruits, and has dismissed hundreds in recent months because of suspicions about their identity or past activities.