When the Taliban overran the district center of Maruf in the southern Afghan province of Kandahar this year, the government resorted to a familiar tactic: Simply relocate the district office 25 miles to the south to say it had not fallen.
From its new location, the government tried to offer basic services and even sent a team of election workers to register voters before presidential elections scheduled for September.
But in the pre-dawn hours on Sunday, the Taliban, whose fighters had encircled the old center of Maruf for nearly two years, came for the new location — ramming as many as four vehicles packed with explosives into the government compound, leaving a trail of death and carnage.
The casualty toll was not immediately clear, as the local authorities were characteristically reluctant to acknowledge the extent of the attack. But security officials in the province, as well as in the country’s capital, Kabul, put the number of dead, mostly police officers, at 34 to 50.
The country’s election commission said that eight of its workers who had been staying at the district center were among the dead.
Aziz Ahmad Azizi, a spokesman for the governor of Kandahar, said that the attack had been heavy and that the toll looked high. “A delegation was appointed to investigate the casualties and the damages,” he said.
Muhammad Yuosuf Yunasi, a member of the provincial council in Kandahar, said, “I don’t understand why the election commission decided to send its employees to a district which is insecure and on the verge of collapse.”
Mr. Yunasi said that most of the residents had abandoned their homes as fighting in the district had persisted during the past couple of years. “I am wondering who they were going to register for upcoming elections,” he added, referring to the commission employees.
The Afghan Interior Ministry said in a statement that four Humvees laden with explosives had been involved in the attack and that the offensive had been pushed back by Afghan forces. The ministry said that 25 Taliban fighters had been killed.
The Interior Ministry and the Defense Ministry said the district center remained under government control, but neither provided any details about how many of the roughly 70 security officials believed to be at the district center had survived the back-to-back blasts.
The number of deadly attacks in Afghanistan has increased as talks between Taliban officials and American diplomats continue in Qatar. The assaults suggest that there is unlikely to be a reprieve in violence anytime soon, following a couple of years of record casualties. Both the Taliban and government forces seem determined to turn battlefield gains into negotiating leverage.
Deadly attacks were also reported in other parts of the country, with bodies piling up on both sides.
In eastern Paktia province, the Taliban early on Sunday attacked a police unit tasked with protecting a dam. Taj Mohammad Mangal, a member of the Paktia provincial council, said at least 21 Afghan forces and 30 Taliban were killed in the clashes that lasted several hours.
In an attack in the northern province of Kunduz on Sunday, at least 13 members of the security forces were killed when the Taliban targeted a military base and two security outposts in the district of Imam Sahib, local officials said.
And in Balkh Province, also in the north, the Defense Ministry said it had killed 45 Taliban fighters, including nine commanders, in airstrikes.
Despite the violence, expectations are high that the latest round of peace talks in Doha, the capital of Qatar, will finalize agreements on a provisional schedule for the withdrawal of American troops and on Taliban guarantees that Afghan soil will not be used for attacks against the United States or its allies.
Agreement on those issues is seen as the key to unlocking negotiations between the Taliban and the Afghan government on the political future of the country and on a cease-fire.
“We have had six rounds of talks before, and in this round we are hoping to finalize the results of those talks into an agreement,” said Suhail Shaheen, a spokesman for the Taliban’s negotiating team. “We are still discussing the text. But so far, it has been smooth.”