Pakistan no longer a militant safe haven: Imran Khan
Khan's assertion was however challenged hours later, when a suicide bomber targeted a religious rally in the southwestern province of Balochistan.
The premier'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 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."
His 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.
On Monday evening, police said a suicide bomber had targeted a rally in the southwestern city of Quetta in Balochistan province. At least eight people - including two police officers - were killed.
Balochistan, Pakistan's largest and poorest province - bordering Afghanistan and Iran - remains home to Islamist, separatist and sectarian insurgents, even as violent incidents have dropped elsewhere 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 the country, 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.
He also praised the "remarkable transformation" of Pakistan's security situation.