The battle raged for 10 hours as policemen fought for the compound, but their commander and five of his men were killed in the fighting as they ran out of ammunition, said Dawa Khan Minapal, a government spokesman in Kandahar. The area is remote, and army and police reinforcements were hours away across the red desert that gives the district its name.

General Raziq had set off leading security forces to the south to repel the Taliban and secure the border when news came of an attack by six suicide bombers on his home in Spinbaldak, which borders Pakistan in the east. The bombers occupied a school near his home and aimed rockets and gunfire on the guesthouse where his family was living. The border guards in charge of security of his house fought back, leading to an extended firefight in which one guard was killed and three others were wounded.

The bombers were shot dead or blew themselves up. A civilian boy was also killed, but there were no casualties in General Raziq’s family, his spokesman, Zia Durani, said.

Two days earlier, an estimated 250 Taliban fighters made a surprise attack on security outposts in Zhare District, to the west of the provincial capital. Afghan security forces repelled the attacks, but the clashes continued much of Friday. Twenty-four Taliban fighters were killed in the heavy fighting, Mr. Minapal said. One policeman and one army soldier were killed, and five police officers were wounded.

An elder from Zhare said the Taliban showed up in several villages Friday morning as people were attending prayers at their mosques. “People rushed to evacuate their homes,” said the elder, Hajji Abdullah Khan, who comes from the village of Pashmul. Some went to an adjoining district of Panjwai and some to Kandahar city, as he did, he said.