Afghan government forces have pushed back the Taliban from Farah city, the capital of the western Farah Province, close to the Iranian border, an Afghan official says.

More than 300 Taliban fighters have been killed in the battle for Farah, provincial Governor Abdul Basir Salangi said on May 16.

He said 25 government troops also died.

Salangi said residents had begun clearing the city, including removing the bodies of almost 40 Taliban fighters.

The attack, the first major assault targeting a provincial capital since the Taliban announced its annual spring offensive, began early on May 15 when several security checkpoints were overrun after midnight, with the militants capturing one urban district and parts of another.

Special police forces from Kandahar and commandos from Herat were also deployed in Farah, Afghan officials said, as heavy fighting continued through May 15.

Afghan and NATO warplanes also took part in the battle.

Zabihullah Mujahid, a Taliban spokesman, claimed responsibility for the attack.

Farah Province has been a key battleground for the Taliban for months. It borders Helmand Province, where the militants control several districts.