Afghan forces killed four out of nine insurgents who launched mortar attacks on Tuesday on areas around the presidential palace and diplomatic district of Kabul, two officials said.
They attacked just as President Ashraf Ghani was delivering a speech marking the beginning of Eid al-Adha, a three-day religious festival.
President Ghani acknowledged the explosions that were heard during his speech and described the perpetrators as enemies of Afghanistan, Islam and peace.
TRT World's Reagan Des Vignes reports.
An official at the NATO-led Resolute Support mission in Afghanistan said nine insurgents had fired about 30 mortar rounds from two separate locations in Kabul.
Afghan police cordoned off the two locations and military helicopters destroyed the two firing positions used by the insurgents.
"In total four of the nine insurgents were killed. The other five insurgents surrendered to Afghan forces," US Forces-Afghanistan spokesman Lieutenant-Colonel Martin O’Donnell said in a statement.
TRT World speaks with journalist Sultan Faizy.
Attacks dampen festive spirit
It was not immediately clear who was responsible for the attack that came two days after Ghani offered the Taliban a three-month ceasefire.
Ghani said security forces would observe the truce beginning this week - but only if the militants reciprocated.
The ceasefire offer was welcomed by the United States and NATO but two Taliban commanders said their leader had rejected it and vowed to continue their war against Afghan and international forces.
Tuesday's attacks dampened the festive spirit and large parts of the city were blocked by police vehicles, forcing people to stay at home. Embassies, offices and residential areas used by diplomats, international aid workers, and other foreigners were put on lockdown.
The Taliban have launched a wave of attacks in recent weeks, including on the city of Ghazni, southwest of Kabul. Hundreds of people have been killed in the fighting.
On Monday Taliban fighters kidnapped about 200 bus passengers in northern Afghanistan and released more than 160 civilians but kept at least 20 soldiers and policemen as captives, an official said on Tuesday.
Nearly 200 passengers were taken hostage by Taliban insurgents near the northern province of Kunduz on Monday as they travelled to the capital, Kabul.
"More than 160 civilians have reached home safely but at least 20 soldiers and policemen have been taken to an undisclosed location by the Taliban," said Ghulam Rabani Rabani, a provincial council member in Kunduz.
Two Taliban commanders confirmed the release. One said the insurgents had no intention of harming the civilians, who were travelling during the Eid al-Adha holiday, but they would hold the police and soldiers.
"We wanted to convey a powerful message to the government that we can launch many attacks and defeat them at every level," said one of the commanders, who declined to be identified.