Authorities in Afghanistan said Wednesday pro-government forces had pushed back Taliban insurgents from parts of a northwestern city and regained control of official buildings after hours of fierce clashes.

Iran PressAsia: Fighting erupted in parts of Qala-e-Naw, the capital of Badghis province, after the Taliban assaulted it overnight from multiple directions.

Residents and officials said insurgent fighters pushed their way into the city, taking over key security installations, including provincial police headquarters, and freeing about 600 inmates from the central prison.

Video footage released by the Taliban showed the prisoners escaping from the facility and insurgent fighters riding motorbikes moving into different parts of the city.   

Provincial governor Hessamuddin Shams said that the Taliban captured all the districts around Qala-e-Naw in recent days, enabling them to attack the provincial capital. Clashes continued in the city throughout Wednesday before Afghan forces, backed by airstrikes, pushed the insurgents out of the city later in the afternoon.

Shams later told reporters that most of the prisoners had been recaptured.  

An Afghan Defense Ministry spokesman, Fawad Aman, tweeted government forces inflicted heavy casualties on the “fleeing" insurgents.

Taliban fighters have made rapid territorial advances across Afghanistan since May 1, when the United States and NATO allies formally began withdrawing their last remaining troops from the country.  

The insurgents have since overrun at least 150 of Afghanistan’s more than 400 districts.  

The assault on Qala-e-Naw was the first by the Taliban against a provincial capital, fueling fears the insurgents intend to regain power in Kabul by force instead of returning to the table for peace talks with Afghan government representatives to negotiate a political settlement.