Militants rattled the Afghan capital Kabul on Tuesday in an hourslong attack that saw parts of the city showered with mortar fire, sparking intense clashes with security forces who used air strikes to quell the assault.
Military helicopters above a mosque fought to quell the assault, firing on insurgents belonging to ISIS who launched a barrage of rockets on the old quarter of the capital.
A group of nine insurgents fired approximately 30 rockets from two locations in the Eidgah mosque area in Kabul wounding two, a Resolute Support spokesman told local media.
An Afghan army helicopter swooped in low over the mosque, firing on militant positions, sending a plume of dust into the sky.
The attack, claimed by the ISIS, was near the presidential palace as President Ashraf Ghani was addressing the nation on the first day of the Eid al-Adha holiday, and came days after he offered the Taliban a conditional three-month ceasefire.
People who, moments ago had been buying livestock for Eid celebrations, could be seen sprinting for shelter as cars swerved from the road to flee fighting.
The rockets landed while President Ashraf Ghani was speaking during an Eid prayer ceremony, which was being broadcast on Facebook.
He could be seen pausing as the blasts are heard nearby, before saying, "there are groups that continue the violence and with the firing of rockets they cannot stop the people of Afghanistan's development."
Ghani's speech was being aired live on Facebook when the attack began.
The president paused as multiple blasts were heard in the background, some sounding nearby, before stating: "This nation is not going to bow to these rocket attacks."
The attackers were in a building behind the mosque, which was partially destroyed in another attack several years earlier and is not believed to have been in use for Eid.
Live TV footage of the attack showed black smoke emanating from the area, while fire trucks and security vehicles rushed to the scene.
An interior ministry spokesman, Bahar Mehr, said on Facebook that security forces were also defusing two explosives-packed vehicles during the fighting.
"Choppers are flying over the site and the security forces are busy defusing two explosive-packed vehicles at the site that the terrorist wanted to detonate," Mr Mehr added on Facebook.
Police said the fighting began at around 9 am, and at least four militants were involved in the attack. An interior military spokesman said militants were using rocket-propelled grenades and mortars to target parts of the city.
Analyst Nazar Sarmachar said the proximity of the attack to the presidential palace highlighted glaring security shortcomings in the capital.
"It could have killed or wounded the president," he said.
After the attack was over, officials issued conflicting statements over the number of militants involved. An Afghan general said two militants behind the attack were killed, while police said four were captured but mentioned none killed.
Kabul police spokesman Hashmat Stanikzai also said just six people had been wounded in the fighting.
A spokesman for US forces offered a third take, saying nine insurgents from two separate positions fired around 30 mortar rounds, with four killed and the other five surrendering to Afghan forces.
A ceasefire offer
The President was speaking just days after he declared a conditional ceasefire during an independence day address on Sunday, to which the Taliban have not officially responded.
But according to two officers, Taliban insurgents rejected the three-month ceasefire offer and vowed to continue its attacks against the government and its foreign allies.
The truce offer was welcomed by the United States and NATO after nearly 17 years of war, but the Taliban have yet to officially respond.
Also on Tuesday, the Taliban released more than 160 civilians a day after they were abducted from three buses in the north. At least 20 soldiers and policemen remain captive, according to an official.
"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.
The Taliban also agreed to release "hundreds" of "enemy prisoners" to mark the Eid holiday.
ISIS has claimed multiple assaults, however, including a devastating suicide blast inside a school last week which killed at least 37 people, the majority of them students. The group said Tuesday's attack had targeted "the presidential headquarters".
However, Kabul-based military analyst Ateequllah Amarkhail said he doubted whether ISIS had the ability to carry out such an assault.
"There have been suicide attacks carried out by Daesh in Kabul, but they are not capable of such a complex attack," he told AFP, using an Arabic acronym for ISIS.