An attack by Taliban fighters in the southern Afghan city of Lashkar Gah has been repelled by government troops backed by Nato forces, officials say, BBC reported.
Five militants had been killed and four Afghan soldiers injured in an eight-hour gun battle, the officials added.
The Taliban said seven men with suicide bombs and machine guns had killed 20 Afghan and foreign soldiers in government buildings and an army base.
Lashkar Gah is the capital of volatile Helmand province.
Provincial officials said the attack had started about 1000 local time (0530 GMT) when militants took over an empty four-storey building under construction near the Sharwali barracks and opened fire on soldiers and police.
Nato spokesman Lt Nico Melendez said international forces had provided attack helicopters as Afghan forces laid siege to the building.
The militants took over an empty building
When the battle finally ended near nightfall, five attackers had been killed, said Afghan Army Gen Sher Mohammad Zazai.
He said four Afghan soldiers had been wounded in the clash but there had been no civilian casualties.
Daud Ahmadi, a spokesman for the provincial governor, said "two to three" of the attackers had detonated their explosives.
The Taliban insurgency is at its fiercest in south and east Afghanistan.
UK and other Nato troops are set to launch the biggest operation yet in Helmand, the BBC learned on Monday.