KABUL (Reuters) - Taliban fighters on Wednesday cut the highway linking the Afghan capital to the southern city of Kandahar, following an attack on the main town of Wardak province to the west of Kabul, officials said.

The attack on Maidan Shahr, about 45 km (28 miles) from the capital, follows a series of assaults on provincial capitals in recent months as Taliban militants step up their insurgency aimed at toppling the Western-backed government in Kabul.

Fighting was continuing just outside the town, and the main highway was blocked, said Abdul Rahman Mangal, a spokesman for the provincial governor.

Government buildings in the town were under attack and reinforcements had been ambushed, the Taliban said in a statement, warning residents to stay clear of the fighting.

Last month, after pushing into the city of Tarin Kot, in the central Afghan province of Uruzgan, fighters also managed to get into Kunduz in the north and Lashkar Gah, the capital of southern Helmand province, threatening to overrun security forces.

(Reporting by Mustafa Andalib; Writing by James Mackenzie; Editing by Clarence Fernandez)