Alleged Taliban fighters and other militants stand handcuffed while being presented to the media at a police headquarters in Jalalabad on March 6, 2018. 
Afghan police said over 17 alleged Taliban militants including two Pakistani nationals were arrested during a five-week operation in Nangarhar province. / AFP PHOTO / NOORULLAH SHIRZADA        (Photo credit should read NOORULLAH SHIRZADA/AFP/Getty Images)
PHOTO: NOORULLAH SHIRZADA/AFP/AFP/Getty Images
Alleged Taliban fighters and other militants stand handcuffed while being presented to the media at a police headquarters in Jalalabad on March 6, 2018. Afghan police said over 17 alleged Taliban militants including two Pakistani nationals were arrested during a five-week operation in Nangarhar province. / AFP PHOTO / NOORULLAH SHIRZADA (Photo credit should read NOORULLAH SHIRZADA/AFP/Getty Images)
Now playing
01:21
The Taliban: How it began, and what it wants
PHOTO: CNN
Now playing
00:50
Pence: Proud of US troops in Afghanistan
Now playing
00:50
Trump on Afghanistan plan: 'Attack we will'
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017.
Trump said a rapid Afghan exit would leave
PHOTO: NICHOLAS KAMM/AFP/Getty Images
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017. Trump said a rapid Afghan exit would leave 'vacuum' for terrorists. / AFP PHOTO / Nicholas Kamm (Photo credit should read NICHOLAS KAMM/AFP/Getty Images)
Now playing
02:08
The pillars of Trump's Afghanistan strategy
CAMP BLESSING, AFGHANISTAN - OCTOBER 22:  Artilerymen await coordinates before firing a 155mm Howlitzer on a Taliban position October 22, 2008 from Camp Blessing in the Kunar Province of eastern Afghanistan. Their unit, Charlie Battery, 3rd Battalion of the 321 Field Artilery, has fired more than 5,900 shells since it deployed to Afghanistan less than a year ago, making it the busiest artilery unit in the U.S. Army, according to to military officers. They most often fire in support of Army infantry units battling Taliban insurgents in the nearby Korengal Valley, site of some of the heaviest fighting in Afghanistan.  (Photo by John Moore/Getty Images)
PHOTO: John Moore/Getty Images
CAMP BLESSING, AFGHANISTAN - OCTOBER 22: Artilerymen await coordinates before firing a 155mm Howlitzer on a Taliban position October 22, 2008 from Camp Blessing in the Kunar Province of eastern Afghanistan. Their unit, Charlie Battery, 3rd Battalion of the 321 Field Artilery, has fired more than 5,900 shells since it deployed to Afghanistan less than a year ago, making it the busiest artilery unit in the U.S. Army, according to to military officers. They most often fire in support of Army infantry units battling Taliban insurgents in the nearby Korengal Valley, site of some of the heaviest fighting in Afghanistan. (Photo by John Moore/Getty Images)
Now playing
00:54
Trump: US in Afghanistan to kill terrorists
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017.
Trump warned Monday that a hasty exit from Afghanistan would create a "vacuum" that would benefit America
PHOTO: NICHOLAS KAMM/AFP/Getty Images
US President Donald Trump speaks during his address to the nation from Joint Base Myer-Henderson Hall in Arlington, Virginia, on August 21, 2017. Trump warned Monday that a hasty exit from Afghanistan would create a "vacuum" that would benefit America's jihadist foes, in a major policy address on his strategy in the 16-year conflict. / AFP PHOTO / Nicholas Kamm (Photo credit should read NICHOLAS KAMM/AFP/Getty Images)
Now playing
00:42
Trump calls terrorists 'losers'
President Donald Trump speaks at Fort Myer in Arlington Va., Monday, Aug. 21, 2017, during a Presidential Address to the Nation about a strategy he believes will best position the U.S. to eventually declare victory in Afghanistan. (AP Photo/Carolyn Kaster)
PHOTO: Carolyn Kaster/AP
President Donald Trump speaks at Fort Myer in Arlington Va., Monday, Aug. 21, 2017, during a Presidential Address to the Nation about a strategy he believes will best position the U.S. to eventually declare victory in Afghanistan. (AP Photo/Carolyn Kaster)
Now playing
01:21
Trump: Our support is not a blank check
Now playing
00:45
Trump acknowledges flip-flop on Afghanistan
PHOTO: POOL
Now playing
01:04
Trump: Love for America requires love for all
president trump afghanistan war plan troop address_00003227.jpg
PHOTO: CNN
president trump afghanistan war plan troop address_00003227.jpg
Now playing
01:34
Trump: We produce a special class of heroes
US President Donald Trump walks by as reporters shout questions to him upon his arrival on the South Lawn at the White House on August 14, 2017 in Washington, DC. Later today President Trump will be meeting from Attorney General Jeff Sessions and FBI Director Christopher Wray regarding this weekendÕs events in Charlottesville, Virginia. (Mark Wilson/Getty Images)
PHOTO: Mark Wilson/Getty Images
US President Donald Trump walks by as reporters shout questions to him upon his arrival on the South Lawn at the White House on August 14, 2017 in Washington, DC. Later today President Trump will be meeting from Attorney General Jeff Sessions and FBI Director Christopher Wray regarding this weekendÕs events in Charlottesville, Virginia. (Mark Wilson/Getty Images)
Now playing
02:24
Will Trump send more troops to Afghanistan?
WASHINGTON, DC - JUNE 13:  U.S. Defense Secretary James Mattis testifies before the Senate Armed Services Committee during a hearing in the Dirksen Senate Office Building on Capitol Hill June 13, 2017 in Washington, DC. Mattis and other Pentagon leaders testified about the proposed FY2018 National Defense Authorization Budget Request.  (Photo by Chip Somodevilla/Getty Images)
PHOTO: Chip Somodevilla/Getty Images
WASHINGTON, DC - JUNE 13: U.S. Defense Secretary James Mattis testifies before the Senate Armed Services Committee during a hearing in the Dirksen Senate Office Building on Capitol Hill June 13, 2017 in Washington, DC. Mattis and other Pentagon leaders testified about the proposed FY2018 National Defense Authorization Budget Request. (Photo by Chip Somodevilla/Getty Images)
Now playing
01:25
Mattis: New Afghanistan strategy decided
PHOTO: Getty Images
Now playing
01:27
US troops in Afghanistan: A history (2017)
An injured man is transported after a car bomb attack in western Kabul, Afghanistan, on Monday, July 24.
PHOTO: WAKIL KOHSAR/AFP/Getty Images
An injured man is transported after a car bomb attack in western Kabul, Afghanistan, on Monday, July 24.
Now playing
00:46
Dozens killed in Kabul car bombing
PHOTO: CNN
Now playing
02:52
Marines remaining in Afghanistan face hardship
(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.
PHOTO: SHAH MARAI/AFP/AFP/Getty Images
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.