Pakistani Prime Minister Imran Khan insisted on Monday that his country is no longer a militant safe haven, and said his administration fully supports the Afghan peace process.
Khan's comments come as the US and the Taliban appear on the brink of a deal that would see US forces begin to pull out of Afghanistan.
In return, the Taliban would enter talks with the Afghan government, stick to various security guarantees and work toward an eventual, comprehensive ceasefire.
Pakistan, which has long been accused of supporting the Taliban and other extremist groups along its border with Afghanistan, is seen as key to helping secure and implement any deal.
"I can tell you that there are no safe havens here," Khan said at a conference in the capital Islamabad.
"Whatever the situation might have been in the past, right now, I can tell you… there is one thing we want: peace in Afghanistan."
Khan's comments came after Sarwar Danish, Afghanistan's second vice president, accused Pakistan of allowing the Taliban to recruit new fighters from Afghan refugee camps in Pakistan.
Khan was addressing a conference marking 40 years of hosting Afghan refugees in his country.
While Pakistan cannot "completely guarantee" that no Taliban are hiding among the estimated 2.7 million Afghans living in Pakistan, Khan said his government had done all it can to prevent attacks in Afghanistan, including by building a border fence.
US peace envoy Zalmay Khalilzad, who has for more than a year led talks between the Taliban and Washington, also attended the conference. He said he was "cautiously optimistic" about progress toward an eventual deal.
The US has "commitments from the Talibs on security issues," he said.
The Taliban, Afghanistan's security forces and the US are supposed to be launching a seven-day "reduction in violence", officials announced last week. The move is part of a confidence-building measure ahead of the announcement of a fuller deal.
But bloodshed continued over the weekend, including a Taliban attack in Kunduz province.
Refugees began flowing into Pakistan after the 1979 Soviet invasion of Afghanistan, and continued to come during the Taliban regime.
UN Secretary-General Antonio Guterres, who is on a three-day visit to Pakistan, credited the nation for supporting Afghan refugees.
"For 40 years, the people of Afghanistan have faced successive crises, for 40 years, the people of Pakistan have responded with solidarity," Guterres said while calling on the international community to do more.
"As we look to the challenges ahead, the global community must step up," he said.