Nine ethnic Hazaras tribesmen were killed by suspected Taliban rebels when they raided their village on Monday in central Uruzgan province, Governor Jan Mohammed Khan said.
Then, on Wednesday, other residents of the victims' village raided a nearby ethnic Pashtun hamlet, killing four people, he said.
The Taliban consists mostly of Pashtuns, the dominant ethnic group in southern Afghanistan, and the families of the nine Hazaras mistakenly thought the attackers had been from the nearby Pashtun village, Khan said.
Security forces have been sent to the region to reduce tension between the two communities, he said.
In another development, US forces killed a rebel and wounded another after coming under attack in neighbouring Zabul province on Wednesday, a US military statement said.
Meanwhile, the commander of Afghanistan's International Security Assistance Force (ISAF) said security would be tight for the poll.
Nato plans to boost ISAF troops
before elections in September
"I'm sure there will be no problem with security for the election," Lieutenant General Ethem Erdagi told a news conference.
Nato plans to boost ISAF by 3000 soldiers in the lead-up to the elections on 18 September.
The extra troops will provide security for thousands of candidates and hundreds of polling stations.
Nato similarly boosted its peacekeeping force during the presidential elections last October.
On Sunday, a female Afghan election worker was shot and wounded about 3km from a voter-registration station in northeastern Nuristan province, the government's electoral body said in a statement on Thursday.