The United States urged Pakistan on Friday not to give sanctuary to "terrorist organizations" — and Pakistan demanded that the Trump administration address safe havens inside Afghanistan and its income from the narcotics trade.

The exchange took place Friday at a Security Council meeting on the issue of Afghanistan's relations with its Central Asia neighbors and the link between peace and security.

U.S. Deputy Secretary of State John Sullivan said the United States can't work with Pakistan if it continues to give sanctuary to terrorist organizations and need to stop this and join efforts to resolve the Afghan conflict.

Pakistan's U.N. Ambassador Maleeha Lodi countered that Afghanistan and its partners, especially the U.S., need to address "challenges inside Afghanistan rather than shift the onus for ending the conflict onto others."

"Those who imagine sanctuaries outside need a reality check," she stressed.

The exchange followed the Trump administration's announcement this month that it was suspending military aid to Pakistan until it takes decisive action against militants.

In August, the U.S. infuriated Pakistan by accusing it of providing a haven for extremist groups that carry out attacks in neighboring Afghanistan. Pakistan repeatedly has said it is acting against Taliban insurgents and members of the Haqqani militant group.

Armed clashes in Afghanistan in the past year were the highest in a decade and civilian casualties remained at near-record levels. More than 2 million people were directly affected by the conflict in 2017, with some 448,000 having to abandon their homes to save their lives.

Sullivan told the council that an Afghan-led, Afghan-owned approach to peace, with firm international support for Afghan security forces, "will make clear to the Taliban that victory cannot be won on the battlefield — a solution is and must be political."

But he said: "We must recognize the reality that while the Afghan government has been adamant about its interests in initiating peace talks with the Taliban, there has been no reciprocal interest on the part of the Taliban."

"That must change," Sullivan stressed.

He urged international efforts to isolate the Taliban, eliminate its sources of income and equipment.

Sullivan also criticized unnamed countries for supporting the Taliban in the name of fighting the Islamic State extremist group, also known as ISIS.

"This approach is misguided or worse pernicious," he said. "The United States believes that the two are not linked. We can and must fight ISIS in Afghanistan while ensuring the Taliban come to the negotiating table."

Pakistan's Lodhi said that after 17 years of war it's "more than evident" that neither the Afghan government nor the Taliban can win militarily.

"The continuing resort to military force and escalation of the conflict without an accompanying political and diplomatic strategy ... will produce more violence, not a political solution," she said. "It is not enough to pay lip service to a negotiated settlement and then do little other than exercise a strategy of force and coercion."

Sullivan, Lodhi and Afghanistan's Deputy Foreign Minister Hekmat Khalil Karzai did not mention the U.S. suspension of aid to Pakistan.

But Karzai said: "We are pleased to note that the imperative of addressing the problem of regional terrorist sanctuaries and safe havens is now recognized more than ever before."

He said there is an opportunity to shift regional threats from terrorism, instability and other criminal activities to peace, security and development — and that is Afghanistan's goal.