Kabul, Afghanistan CNN  — 

Afghan Taliban fighters killed 17 Afghan police officers in an attack on a police base before dawn Saturday, just hours before the militant group called for a three-day ceasefire with Afghan forces over the Eid al-Fitr holiday in mid-June.

The ceasefire call followed the Afghan government’s own declaration of a 10-day truce over Eid.

Five police officers were injured in the attack on the base in the Qalai Zal district of Kunduz province, the spokesman for Kunduz chief of police, Enhamuddin Rahmani, said.

Taliban spokesman Zabiullah Mojahid claimed responsibility for the attack in a statement to media.

The separate Taliban statement ordering a halt on attacks of “internal enemies” over the Eid al-Fitr holiday said operations against “foreign invaders” should continue, with attacks against them “wherever and whenever they are seen.”

President Ashraf Ghani announced Thursday that his government was ordering a temporary ceasefire between June 12 and June 21, the period this year in which Muslims celebrate the end of Ramadan, the Islamic holy month of fasting.

“This ceasefire is an opportunity for Taliban to introspect that their violent campaign is not winning them hearts and minds, but further alienating the #Afghan people from their cause,” he added on Twitter.

In its statement, the Afghan Taliban said it would allow prisoners to visit with families and asked for the group’s regional leaders to commute some prisoners’ sentences. The group also called for its fighters to avoid large gatherings to prevent any civilian deaths in potential airstrikes.

Back channels

US forces in Afghanistan confirmed Thursday they would respect the Afghan government’s ceasefire with the Taliban, with Gen. John Nicholson, commander of US and international forces in Afghanistan, describing it as “another bold initiative for peace.”

The truce does not include US counterterrorism efforts against groups such as al Qaeda and ISIS in Afghanistan.

US Secretary of State Mike Pompeo also welcomed the Afghan government’s move, saying it “underscores its commitment to peace as both a national and religious responsibility.”

In his video message, Ghani said all Afghan security forces would be instructed to stop offensive operations “only on Afghan insurgents,” with ISIS, al Qaeda and other international terrorist networks excluded from the ceasefire.

US officials said Thursday that the Taliban had expressed interest in the pause in hostilities through Pakistani back channels and other mechanisms.

Ghani: New chapter

Afghanistan has suffered a recent uptick in violence despite reports in March that suggested some factions of the Taliban had expressed interest in pursuing peace talks with the Afghan government.

Fourteen people including a district governor were killed in a Taliban attack in Afghanistan’s southeastern Ghazni province on April 12. At least another 14 were killed after an explosion at a mosque in eastern Afghanistan on May 6, but the Taliban denied involvement.

Afghan President Ashraf Ghani shakes hands with a foreign delegate at at talks in Kabul on February 28.

Ghani first spoke about the possibility of a ceasefire with the militant Islamist group in February, when he announced that the Afghan government was willing to recognize the Taliban as a legitimate political party as part of a potential agreement.

“We’re ready to restart talks about peace with Pakistan again and forget bitter experiences of the past and start a new chapter,” he said.

The Taliban has been waging a bitter fight in Afghanistan with the ultimate goal of ruling the country and imposing its strict interpretation of Islamic law. The group controlled Afghanistan until 2001, when it was overthrown by the US-led coalition that invaded the country following the 9/11 attacks.

In recent years, a resurgent Taliban has taken control of significant swaths of the country and terrorized citizens and foreigners alike. Brazen terror attacks have even shaken the resolve of those who live in the heavily secured capital, Kabul, and raised questions over the Afghan government’s ability to protect the country.

CNN’s Ehsan Popalzai reported from Kabul, and Laura Smith-Spark wrote from London. CNN’s Judith Vonberg contributed to this report.