President Ghani held talks with Sharif in Kabul as Pakistan mourned the victims — mostly children — killed in the massacre that put new pressure on the Islamabad government to combat militancy.
Pakistan accuses Afghanistan of protecting members of the Pakistani Taliban, while Afghanistan routinely accuses neighbouring Pakistan of providing shelter within its borders to the Afghan Taliban.
“The time has come for Afghanistan and Pakistan to work together in sincerity and jointly take effective actions against terrorism and extremism,” Ghani said in a statement.
“To restore peace and stability in Afghanistan and Pakistan, Afghanistan is prepared to independently or together with Pakistan, take serious measures against terrorism and extremism.”
The palace statement gave no details on whether the two discussed the handing over of Pakistani Taliban chief Mullah Fazlullah, who is believed to be hiding in Afghanistan.
Sharif said Pakistan was hunting those behind the Peshawar attack, according to the statement from the Afghan presidency.
“(Sharif) said that Afghanistan and Pakistan should jointly work together and take serious steps in the fight against terrorism so to prevent the repeat of such acts,” it added.
Retired Afghan general Atiqullah Amarkhail dismissed Sharif’s trip as an attempt to distract attention from the failure to prevent the attack in the northwestern city of Peshawar.
“The trip is no more than a manouevre by the Pakistanis to pressure the Afghan government and pretend those responsible for the deadly Peshawar attack are based in Afghan soil,” said Amarkhail.
Some of the militants who attacked the army-run school in Peshawar Tuesday spoke in Arabic, a senior Pakistani security official told AFP, which he said suggested that they had links over the border in Afghanistan.
Ghani, who came to power in September, and Pakistani Prime Minister Nawaz Sharif have overseen an improvement in ties in recent months.
Pakistan’s army and intelligence services that are widely seen as the driving force behind the country’s defence and foreign policies.
Afghanistan is facing its own surge in violence as US-led NATO troops pull out by the end of the year and are replaced by a 12,500-strong support mission tasked with advising and assisting the Afghan security forces.
Recent deadly attacks have targeted army buses, mine clearance teams and foreign compounds in Kabul.