KABUL, May 12 (Reuters) - Pakistani Prime Minister Nawaz Sharif promised on Tuesday to help Afghanistan's government hunt down militants, saying on a visit to Kabul that he condemned a recent offensive by Taliban insurgents.
Former Afghan president Hamid Karzai had long accused Islamabad of tacit support of the Afghan Taliban, whose leaders are believed to be hiding in Pakistan.
"Any effort by any militant or group to destablise Afghanistan will be dealt with severely and such elements will be outlawed and hunted down," Sharif said on Tuesday.
He was speaking during a joint appearance with Afghan President Ashraf Ghani, who has made improving relations with Pakistan a priority since taking office last year.
The neighbours are seeking to increase military cooperation to fight the two main branches of the Taliban, one fighting to topple the U.S.-backed government in Kabul and the other against Pakistan's government.
"I assure you, Mr. President, that the enemies of Afghanistan cannot be friends of Pakistan," Sharif said.
Ghani's move to mend ties with Pakistan is partially aimed at convincing Islamabad to use whatever influence it has among Taliban leaders to persuade them to join peace talks.
The Afghan Taliban have been fighting to restore their hard-line Islamist regime that was ousted in a U.S.-led military action in retaliation for sheltering the al Qaeda planners of the Sept. 11, 2001 attacks on American cities.
Afghan and Taliban representatives recently met in Qatar for informal discussions on a possible peace process, but the insurgents have also launched attacks across the country as part of their annual spring offensive.
The Taliban push has brought its fighters to the outskirts of a major northern city, Kunduz, and battles with Afghan army and police are ongoing. (Reporting by Kay Johnson; Editing by Ruth Pitchford)