KABUL: Afghanistaninfo-icon's President Ashraf Ghani alleged on Wednesday that the "keys to warinfo-icon are in Islamabad, Quetta, Rawalpindi" - all cities in Pakistaninfo-icon - claiming that the country was a safe haven for cross-border militant activities.

Afghanistan has previously accused Pakistan of turning a blind eye to Afghan Taliban commanders on its soil and even of supporting the militant group it is fighting, which Islamabad denies.

Ghani said the "key to peace was in Afghanistan", as talks between the Taliban and USinfo-icon officials on ending the 17-year war in Afghanistan appear to be gaining momentum. The leader of the war-torn nation made the remarks as US peace negotiator Zalmay Khalilzad visited Kabul for consultations on his progress in talks with the Taliban.

A month ago, Islamabad assured Khalilzad that it would back a negotiated settlement with the Taliban to end the long war in Afghanistan. US President Donald Trumpinfo-icon has personally asked for Islamabad's help in advancing the Afghan peace process.

Regional powers such as Chinainfo-icon have also pledged to help Afghanistan and Pakistan overcome their longstanding suspicions about each other.

But political tension between Kabul and Islamabad and allegations against one another continue to strain their ties. In 2017, Pakistan began building a fence on its 2,500 km (1,500 mile) border with Afghanistan to prevent incursions by militants.

"If the Afghan government is illegitimate, so where does the Taliban get their legitimacy from?," said Ghani.

Direct talks between the Afghan government and the Taliban collapsed in 2015, and the Taliban, fighting to drive out international forces and re-establish their version of strict Islamic law, have said they plan to continue negotiating with the U.S. officials on Feb. 25.