Kabul, Afghanistan (CNN) -- Afghanistan's president has backed the selection of Gen. David Petraeus as the top NATO commander in Afghanistan, saying he is "experienced" and an "expert commander" with knowledge of his war-torn nation.
President Hamid Karzai made the comments Saturday as he met Adm. Michael Mullen, chairman of the Joint Chiefs of Staff, a statement from Karzai's office said.
Later Saturday, Mullen flew to Islamabad to meet with Pakistani President Asif Ali Zardari.
Gen. Ashfaq Parvez Kayani, Pakistan's army chief, and U.S. Ambassador to Pakistan Anne W. Patterson also attended the meeting, which dealt with bilateral relations, the fight against militants, and regional security, a Pakistani government press release said.
Mullen was in Afghanistan on a scheduled visit that took on new significance after Gen. Stanley McChrystal was removed from his position this week as commander of the Afghan war, a day after Rolling Stone magazine published critical comments about top White House officials by members of McChrystal's staff.
President Barack Obama nominated Petraeus, the head of U.S. Central Command and the architect of the surge strategy in Iraq, to take McChrystal's place.
According to the statement, Karzai told Mullen that McChrystal was an "excellent" military commander who worked to avoid civilian casualties, forge coordination between Afghan and international forces, and take "useful steps" in training, developing and equipping Afghan forces.
Mullen assured Karzai that Petraeus would continue these efforts.
Both men said that improving the fight against terror and pursuing a lasting peace "is our priority and more important than any time before," the statement said.
"Stunned" by the Rolling Stone article, Mullen had said he agreed with Obama's decision to remove McChrystal. He had said that he planned to discuss the shift in leadership with Afghan military and civilian officials.
"My message will be clear: nothing changes about our strategy, nothing changes about the mission and nothing changes about the resources we are dedicating or the commitment we are making to defeat al Qaeda and its extremist allies in the region," Mullen said in a Pentagon press briefing Thursday. "We cannot lose the momentum we have together with our partners, allies and friends."
An explosion near the foreign ministry in Kabul during Mullen's visit Saturday caused a scare, but police said the blast was an accident and not an attack.
Meanwhile, in Afghanistan, a Taliban commander disguised as a woman was shot dead Friday night in Afghanistan when he fired at troops, NATO's International Security Assistance Force said.
Authorities identified the man as Ghulam Sakhi, the senior Taliban commander in northern Logar province.
ISAF said intelligence sources tracked Sakhi to a compound near the village of Qal-eh Saber in Pul-e 'Alam district.
After Afghan troops called for women and children to leave a building, Sakhi came out with the group, disguised in women's attire.
ISAF said he pulled out a pistol and a grenade and fired at troops. Afghan and coalition forces shot him and he dropped the grenade, which detonated and wounded a woman and two children.
Authorities say Sakhi was involved in improvised explosive device attacks, ambushes and indirect fire attacks. He also kidnapped and killed a National Directorate of Security chief in Logar province.
In other Afghan fighting, several insurgents in Zabul province were killed in a "precision airstrike" on Friday night and bomb attacks in southern Afghanistan killed three NATO-led service member on Saturday.
CNN's Atia Abawi contributed to this report.