Islamabad , Pakistan ( CNN ) -- A roadside bomb killed a top Pakistani general Sunday , just a day after officials announced plans to withdraw troops from a war-ravaged region near the border with Afghanistan . The Pakistani Taliban claimed responsibility for the attack , which killed Maj. Gen. Sanaullah Khan , the commanding officer in Swat Valley . Two other officers were also killed , army officials said . For years , troops have clashed with Taliban militants in Swat , which drew global attention last year when militants there shot teenager Malala Yousafzai point-blank in the head and neck after she defied the Taliban 's ban against girls in school . The Pakistani army has reclaimed control of the Swat Valley , where the Taliban held significant sway for years . But Sunday 's attack was a troubling reminder of the region 's volatility even as officials consider pulling out troops . The roadside bombing occurred in the Upper Dir district of Khyber Pakhtunkhwa province , in northern Pakistan near the border with Afghanistan . On Saturday officials in Khyber Pakhtunkhwa announced for a `` phased withdrawal '' of troops from Upper Dir , Lower Dir and Swat . And last week the Pakistani government announced plans to pursue renewed peace talks with Taliban militants . Pakistani leaders push for Taliban talks . But a Taliban spokesman said Sunday that there is no ceasefire with the Pakistani government , warning that such attacks will continue . `` We have killed them , '' Pakistani Taliban spokesman Shahidullah Shahid said , `` as they are killing us . '' Prime Minister Nawaz Sharif issued a statement expressing condolences over the slain officers ' deaths Sunday . `` ( The ) Pakistan Army has made substantial sacrifices to protect the nation against the menace of terrorism , '' he said , `` and such cowardly acts by terrorists can not deter the morale of our armed forces . '' Karachi , Pakistan , shut down after violence . Journalist Sophia Saifi reported from Islamabad , journalist Zahir Shah Sherazi reported from Peshawar , Pakistan , and CNN 's Catherine E. Shoichet reported from Atlanta . CNN 's Aliza Kassim contributed to this report .
The Afghan Taliban claim responsibility for the attack . Officials had just announced plans for ` ` phased withdrawal '' of troops from some areas . The blast is a troubling example of the Taliban 's volatility .