KABUL — The Afghan government on Friday delayed legislative elections by one week in Kandahar province after the provincial police commander and intelligence chief were assassinated Thursday by a Taliban gunman, leaving a dangerous security vacuum in the southern region that is home to the insurgents.

A spokesman for President Ashraf Ghani announced just after noon that the National Security Council had decided in an “extraordinary meeting” that Saturday’s polls would be suspended, as recommended by provincial leaders and the National Election Commission. 

Thursday’s audacious daytime attack, immediately claimed by the Taliban, targeted a meeting of senior U.S. military and Afghan leaders in Kandahar city. Gen. Austin “Scott” Miller, the top U.S. military commander in Afghanistan, escaped unharmed, but Lt. Gen. Abdul Raziq, the Kandahar police commander, and Abdul Momin, the provincial intelligence chief, died of gunshot wounds, officials said.

The provincial governor, Zalmai Wesa, was hospitalized with severe injuries, officials said. Initial reports that he, too, had been killed were inaccurate.

The slaying of Abdul Raziq, 39, a fiercely anti-Taliban official who was considered the most powerful man in southern Afghanistan, sent shock waves through the country on the eve of nationwide elections, in which more than 7 million voters have registered to choose among 2,500 candidates for 249 seats in parliament.

It also further weakened the grip of the Ghani administration, which has been struggling to secure the country in the violent run-up to the elections. Despite a reputation for brutality, Abdul Raziq was viewed as a crucial asset to the government, a force for political stability and a valued partner to the U.S.-led anti-insurgent campaign. 

The attack also raised questions about Afghan and U.S. efforts to push for peace negotiations with the Taliban — a campaign that has recently intensified with a regional tour by Washington’s new special envoy, Zalmay Khalilzad. Taliban officials claimed he met with their representatives in Qatar last week and that both sides agreed to continue talks, although U.S. officials have not confirmed that meeting. 

In Kandahar, a sprawling city that is the country’s second largest, residents and officials described an atmosphere of shock, tension and sorrow. They said Afghan security forces, led by special operations units sent from Kabul, were deployed across the city to keep order, especially during the funeral of Abdul Raziq at a popular shrine Friday morning.

“The entire city is in lockdown,” said Javed Faisal, a candidate for parliament, speaking by cellphone from Kandahar. “Everyone is mourning.” He said the city was secure but that “people are worried, not only for Kandahar but for the entire country.”

The Taliban has vowed to “severely disrupt” the polls. Ten candidates have been killed in pre-election violence, including two in Helmand province bordering Kandahar, along with more than 100 other Afghans.

The postponement of elections in Kandahar marked the latest setback in plans for the long-delayed nationwide polls, which have been plagued by charges of advance vote-rigging and the distribution of false voter ID cards, as well as by numerous violent attacks on candidates and campaign rallies. Because of insurgent threats, authorities had already planned to shutter hundreds of polling places in especially vulnerable areas on Saturday.

 The government plans to deploy thousands of security forces to protect polling places, and a successful parliamentary vote is seen as a crucial step in Afghanistan’s democratic evolution and a key to holding a presidential election in the spring. But election officials said that shell-shocked citizens in Kandahar were not “morally ready” to vote, and there were concerns that the violence there would lower turnout nationwide. 

More details emerged Friday about the devastating insider attack, which was carried out by a lone gunman who had recently joined the provincial governor’s protective force. He opened fire as Miller, Abdul Raziq and other officials left a meeting in the governor’s compound and were walking to a helipad. Miller was able to board a helicopter and return safely to Kabul.

“He was a young guy, a bodyguard of the governor, hired only a month and half back,” the deputy governor, Agha Lala Dastageri, said in a telephone interview. As the officials were heading to the helipad, he said, the guard, armed with a Kalashnikov rifle, fired on the group from behind.

Dastageri said there was no other source of gunfire and that initial indications were that the guard had been “hired” by the Taliban. But he said investigators were trying to determine whether he had any other “religious, personal or tribal” motives.

A second version of the events, provided by a local journalist who asked not to be named, suggested a more complicated scenario. He described hearing “a sustained and sporadic” exchange of gunfire after the initial attack, both inside and outside the official compound, which he said resulted in injuries to two Afghan police officers and one civilian.

The journalist also said that several U.S. troops were prevented from leaving the compound for hours by police in Abdul Raziq’s force and that they finally broke through a heavy vehicle barrier and left. It was not clear whether those troops were based in Kandahar or accompanying Miller from Kabul. The report could not be immediately confirmed.

Sayed Salahuddin and Sharif Hassan contributed to this report.