KABUL — The Taliban launched an attack on the northern city of Kunduz on Saturday in a major show of force against the Afghan government even as the group’s leaders meet with U.S. negotiators in Qatar in a bid to end 18 years of war.

Much of the Kunduz province is controlled by the Taliban, and the provincial capital, which is one of the largest cities in Afghanistan, has fallen to the militants twice in recent years. The city is also a strategic transport hub in northeastern Afghanistan.

 Afghan forces worked to repel an hours-long assault on the city throughout the day. Then, in the early evening, as police offered a news briefing at a major roundabout in the city, a suicide bomber detonated a blast, killing at least 10 people, officials said. Police spokesman Sayed Sarwar Hussaini was among the dead. 

Acting defense minister Asadullah Khalid traveled to Kunduz on Saturday and assured civilians the city “will not fall to militants,” ToloNews reported. He said nine security forces and 36 Taliban fighters were killed in the violence.

“We are here with the people of Kunduz,” he said.

The suicide bomber detonated the explosion shortly thereafter. It was not immediately clear whether the police chief or any journalists were among the dead.

Earlier in the day, Hussaini told the Associated Press that a “massive attack” was underway and that there were “intense gun battles” around the city.

Mohammad Yusuf Ayoubi, a member of the provincial council, told The Washington Post in a phone call on Saturday morning that there was “intense fighting in the outskirts of the city and also in some areas deep inside the city.” 

“The city is almost deserted,” he said, adding that airstrikes were being carried out against the militants. 

Presidential spokesman Sediq Seddiqi tweeted on Saturday that “Afghan security and defense forces are fully prepared to thwart the Taliban offensive in Kunduz.” 

“As always the Taliban have taken positions in civilian areas,” he wrote.

U.S. Army Gen. Austin “Scott” Miller, the top American military commander in Afghanistan, was in Kunduz on Saturday but left shortly before the bombing.

In a news conference midday Saturday, Seddiqi said the Taliban’s attack demonstrates that the militants “do not accept the opportunity for peace created by the U.S. and Afghan governments.” He added that the assault on Kunduz is “completely in contradiction with what they talk about in the peace process in Doha.”

“In one side, they are busy in talks with the U.S.,” he said. “In the other side, they carry out attacks on homes, residential areas and our city in Afghanistan.”

Taliban spokesman Zabiullah Mujahid posted a video on Twitter showing a number of armed Taliban fighters surrounding a police station in Kunduz. Four police officers came out of the station and handed their weapons and body armor to the Taliban. A Taliban fighter who appears to be recording the video assures the police officers they would be safe. The officers left after hugging the militants. The Post was unable to independently verify the authenticity of the video. 

Kunduz has experienced extreme levels of violence in recent years. 

In 2015, when the Taliban took control of the city, a U.S. airstrike hit a hospital run by Doctors Without Borders, killing more than 40 people, including patients and medical staff members. The Pentagon said the hospital was not the intended target. Last year, a United Nations report said at least 30 children were among those killed in Afghan government airstrikes in Kunduz province. 

U.S. and Taliban negotiators are in Qatar for their ninth round of peace talks in 10 months. Both sides have said they are nearing a deal, although it was unclear whether an agreement would be made by Washington’s unofficial Sept. 1 deadline. Talks were scheduled to continue on Saturday morning. 

The Taliban is calling for a complete withdrawal of foreign troops, and U.S. negotiators are asking for a complete cease-fire. There are 14,000 U.S. troops in Afghanistan, but this past week, President Trump told Fox News Radio that an initial withdrawal would reduce that number to 8,600. 

A presidential election is scheduled here for late September, and President Ashraf Ghani, who is up for a second term, has insisted it will be held on time, even as his top competitor, Chief Executive Abdullah Abdullah, said at a rally this past week that he would be willing to “quit elections for the sake of peace.”

The election has already been postponed twice. 

Salahuddin Sayed and Sharif Hassan contributed to this report.