Attahullah Khogyani, the provincial governor's spokesman, said 10 insurgents were also killed in the Friday night attack in Sherzad district.
The civilians' vehicle was exiting the area right after the raid and security forces thought that Taliban fighters were trying to escape, so they opened fire and mistakenly killed the civilians, Khogyani said.
Ajmal Omer, a provincial councilman, said villagers carrying the victims' bodies in a procession in the provincial capital of Jalalabad demanded justice for the victims' families.
Both Taliban and Islamic State group fighters are active in eastern Afghanistan, especially in Nangarhar.
The U.N. Assistance Mission in Afghanistan (UNAMA) said Saturday it was concerned about the heavy toll on civilians in the conflict during the holy month of Ramadan, and urged parties to do more to prevent casualties.
It condemned the insurgents for incidents in which civilians have been deliberately targeted and said that during the first week of Ramadan, the Taliban killed six civilians and wounded 28 others in a premeditated attack against a non-governmental organization in Kabul.
The statement said the U.N. mission is looking into the attack inside a mosque in the capital of Kabul during Friday prayers. Two people, including the prayer leader, were killed and 16 others were wounded.
"Deliberate and indiscriminate attacks against civilians can never be justified and amount to war crimes," said Tadamichi Yamamoto, the Secretary-General's special representative for Afghanistan. "An attack in a mosque, especially at a time of prayer during Ramadan, is particularly heinous," Yamamoto was quoted in the statement.
The U.N. mission said recent airstrikes against anti-government targets in southern Helmand and eastern Kunar provinces killed as many as 14 civilians.
In the May 20 and 22nd attacks in the Greshk district of Helmand and the Chawki district of Kunar, the civilians killed included four women and eight children, and 12 other civilians were wounded, the U.N. said.
Meanwhile, the Taliban claimed responsibility for Friday's attack on an armored vehicle belonging to Romanian NATO forces at Kandahar air base. Five Romanian NATO soldiers were injured.
Separately, Col. Dave Butler, U.S. Forces Afghanistan spokesman, said a NATO helicopter had a hard landing due to mechanical failure in southern Helmand province.
"There was no hostile fire or enemy contact involved," he said in a statement. Both Afghan and U.S. personnel were injured but were all in stable condition and expected to recover, he said. He said the aircraft was destroyed.
Taliban insurgents are active in Helmand and control several districts in the province.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.