KABUL, Afghanistan — The Taliban attacked a northern Afghan city early Sunday, just a day after striking another city in the north, raising fears of renewed assaults on population centers even as the top U.S. negotiator said he was on the “threshold” of securing a peace deal with the militant group as he headed to Kabul.

Taliban fighters attacked Pol-e Khomri from at least two directions, Fawad Aman, a spokesman for the Defense Ministry, told The Washington Post. A statement from the Afghan intelligence agency said that 30 to 40 Taliban fighters launched the attack around 2 a.m.

Two security officials, who spoke on the condition of anonymity because they were not authorized to talk to the news media, said the Taliban entered the city from several directions and for a time blocked a key highway linking Kabul, the capital, with the rest of the north. This was the first time the Taliban had gained any ground in Pol-e Khomri.

Mohammad Nasim Mudabber, a lawmaker in Pol-e Khomri, said the battle for the city was ongoing, with Taliban fighters hiding in civilian homes and using residents as “human shields.” He said that residents could hear machine-gun fire and rocket attacks and that security forces were “moving ahead slowly to prevent civilian casualties” and had not yet carried out house-to-house searches for the militants.

“Unfortunately, we have casualties, but we don’t have a number yet,” Mudabber said.

In the northeastern province of Badakhshan on Sunday evening, an explosion at a soccer field in Faizabad, the provincial capital, killed Nazir Mohammad Niazi, the city’s former mayor. A key anti-Taliban militia leader, he was considered a crucial bulwark against the militants.

Early Sunday, U.S. negotiator Zalmay Khalilzad tweeted that the latest round of talks with the Taliban had concluded in Doha, Qatar, and that both sides were on “the threshold of an agreement.” He said he would travel to Kabul later in the day for further consultations. Marathon talks with Taliban delegates have gone late into the night this past week as an unofficial Sept. 1 deadline for a deal loomed.

The attack on Pol-e Khomri came just one day after Taliban militants launched a major assault on the large northern city of Kunduz from multiple sides, prompting a daylong standoff with Afghan forces. Kunduz has fallen to the Taliban twice in the past few years but is currently under government control.

On Saturday evening, as a police spokesman gathered with officials at a busy roundabout in the city, a suicide bomber struck, killing the spokesman, Col. Sayed Sarwar Hussaini, and at least nine others.

The attack occurred shortly after acting defense minister Asadullah Khalid visited the city and assured residents that it would not fall to militants. Army Gen. Austin “Scott” Miller, the top U.S. commander in Afghanistan, also visited Kunduz on Saturday but left shortly before the suicide attack.

On Sunday, the Interior Ministry said in a statement that the “entire Kunduz city has been cleared” and that the situation there was “back to normal.” Officials said dozens of Taliban fighters, 20 members of the security forces and five civilians were killed.

The attack in Kunduz was a brazen display of violence amid negotiations in Qatar. Khalilzad tweeted Saturday that he “raised the Kunduz attack in talks today, telling the Taliban that violence like this must stop.”

In Kabul, presidential spokesman Sediq Sediqqi said the attack was “completely in contradiction with what (the Taliban) talk about in the peace process in Doha.”

The United States and Taliban have met for nine rounds of talks in 10 months. The Taliban wants a full withdrawal of all foreign troops from Afghanistan. The United States has demanded a complete cease-fire and has insisted that the Afghan government be included in separate talks after a deal is reached. The Taliban has refused to include the Afghan government in ongoing peace negotiations.

Meanwhile, President Ashraf Ghani is forging ahead with plans to hold a presidential election on Sept. 28. He is facing increasing pressure to postpone the vote, which has been delayed twice before, amid concerns that the election could thwart prospects for peace and lead to more violence.

Already, election officials have said that about 2,000 polling places will not be open on election day because of insecurity. And this week, his top competitor, Chief Executive Abdullah Abdullah, said he would be willing to drop out in the name of peace.

Comments are not available on this story.