Afghan president Ashraf Ghani is visiting the embattled city of Ghazni, a week after the Taliban in a surprise attack managed to infiltrate deep into the key provincial capital and capture several areas.

The insurgents hung on in Ghazni for nearly five days before US-backed Afghan forces flushed them out.

President Ghani arrived in the city by helicopter on Friday and is holding meetings with security officials and elders.

Police official Bilal Ahmad said security is tight, with Afghan helicopters patrolling overhead and a heavy security presence.

The five-day battles with the Taliban in Ghazni, the capital of Ghazni province, killed at least 100 members of Afghan security forces and 35 civilians before calm was restored on Tuesday.

The Taliban still hold power in much of the province.