Taliban fighters in Afghanistan tried to overrun a key provincial capital and stormed parts of the city before they were beaten back by air strikes and government reinforcements.

Clashes continued in Ghazni throughout the day and fighting temporarily closed the main highway linking the north and south of the country.

Afghan forces said they remained in control of the strategically-important city, but the militants reportedly came within a few hundred yards of several government buildings.

The attack around 80 miles south of Kabul was the militants' second all-out assault on a provincial capital this year and was one of their most audacious operations to date.

Capturing Ghazni even briefly would symbolically cut Afghanistan's second city of Kandahar off from the country's capital.

A local hospital said at least 14 Afghan policemen had been killed in the fighting, while security officials said there were dozens of dead Taliban fighters. An Afghan military helicopter had crashed during the battle, though an army spokesman said it was not clear if it had been shot down.

"The Taliban are dropping missiles near residential and commercial areas. There has not been a single minute of silence for the last eight hours," said a senior government official in Ghazni told Reuters early on Friday.