KABUL, Afghanistan — Muhammad Didar Mukhlis Afghan, a sergeant serving at a remote Afghan Army base, was pleased when his nephew invited his wife and son to his wedding back home in eastern Afghanistan.

The sergeant pitched in almost $400 to help with the nephew’s wedding costs. But instead of a wedding, the event became a murder scene.

The nephew, Qari Aziz, was among a group of Taliban fighters who killed the sergeant’s wife and son inside Mr. Aziz’s home in May, according to Sergeant Afghan and government officials in Paktia Province.

“They attacked my wife and son because I am serving in the ranks of the Afghan National Army,” Sergeant Afghan said. He did not know his nephew was secretly a member of the Taliban in Paktia, he said.