The Taliban have fired rockets towards the presidential palace in Kabul as President Ashraf Ghani was giving his holiday message for the Muslim celebrations of Eid al-Adha, Afghan police said.

Police official Jan Agha said the boom of the rockets was heard during Ghani’s speech, televised live on Tuesday.

Ghani heard the thud and interrupted his message to say: “If they are thinking the rocket attack will keep Afghans down, they are wrong.”

Police said the first rocket landed somewhere near the presidential palace, the second near a Nato compound and the US Embassy in Kabul, but no-one was hurt.

Afghan forces have surrounded a house from where they believe the rockets were fired and an aircraft bombed the location, destroying the home.

The assault on the major Muslim holiday sent a stark message.

The area where the rockets hit is one of the most secure in Kabul
The area where the rockets hit is one of the most secure in Kabul (Rahmat Gul/AP)

It was also another blow to Ghani’s efforts to bring the insurgents to the negotiation table and hold peace talks to end the country’s 17-year war.

The area where the rockets hit is one of the most secure in the heavily fortified part of Kabul, where embassies and Afghan government buildings are surrounded by high cement blast walls and coils of razor wire.

Many streets near the US Embassy are closed off, as well as those near sensitive government and military locations.

Many streets near the US Embassy are closed off
Many streets near the US Embassy are closed off (Rahmat Gul/AP)

Kabul police spokesman Hashmat Stanekzia said Afghan police had noticed a suspicious vehicle earlier on Tuesday morning and followed it to a house near the sprawling Eid Gah mosque where hundreds had gathered to offer their prayers for the Eid al-Adha holiday.

Once inside the house, the suspects are believed to have fired the rockets, Stanekzia told The Associated Press.

A helicopter gunship was called in and bombed the location, destroying the house and the vehicle.

Eyewitnesses at the scene said that after the explosions, sporadic shooting could be heard from the area though it was not clear who was firing.

On Sunday, Ghani had offered a conditional ceasefire to last during the holiday, saying it would only take effect if the Taliban reciprocated.

The Taliban have been at war with the US-backed Afghan government for nearly 17 years, and have stepped up attacks in recent months, seizing rural districts and carrying out major assaults against security forces and government compounds on an almost daily basis.

On Monday, Afghan forces rescued nearly 150 people, including women and children, just hours after the Taliban ambushed a convoy of buses and abducted them in northern Kunduz province.

The quick response marked a rare if limited battlefield success for the troops after weeks of unrelenting insurgent attacks.