UNITED NATIONS - President Barack Obama, in a wide-ranging address to the UN General Assembly, said Tuesday his administration had confined drone stocks to specific circumstances and would conclude Afghan war next year.

Obama also referred to the loss of 100 Pakistanis in Peshawar church bombings as he saw continuing militant threats to international peace and security.

“Next year, an international coalition will end its war in Afghanistan, having achieved its mission of dismantling the core of Al-Qaeda that attacked us on 9/11,” he told the 193-member assembly as the high-level 68th session debate got under way.

“Beyond bringing our troops home, we have limited the use of drones so they target only those who pose a continuing, imminent threat to the United States where capture is not feasible, and there is a near certainty of no civilian casualties,” he added. Pakistan is set to raise the drone issue at various UN forums.

In his 30-minute speech, Obama sounded a cautiously optimistic tone about the prospects for diplomacy, saying he had instructed Secretary of State John Kerry to pursue face-to-face negotiations with Iran on its nuclear programme. The roadblocks may prove to be too great,” he added, “but I firmly believe the diplomatic path must be tested.”

Obama also called on the Security Council to pass a “strong” resolution that would impose consequences on Syria if it fails to turn over its chemical weapons. The American threat of military action against Syria, Obama said, had set in motion diplomatic efforts with Russia to take over and eventually destroy Syrian weapons.

“Without a credible military threat, the Security Council had demonstrated no inclination to act at all,” the president said. “If we cannot agree even on this, then it will show that the UN is incapable of enforcing the most basic of international laws. On the other hand, if we succeed, it will send a powerful message that the use of chemical weapons has no place in the 21st century, and that this body means what it says.”

Obama also addressed the issue of US intelligence gathering around the world in the wake of international criticism that followed whistle blower Edward Snowden’s leaks.

“And just as we reviewed how we deploy our extraordinary military capabilities in a way that lives up to our ideals, we have begun to review the way that we gather intelligence, so as to properly balance the legitimate security concerns of our citizens and allies, with the privacy concerns that all people share.“

President Obama said that Iran’s diplomatic overture in recent weeks could provide a foundation for an agreement on its nuclear program, but he warned that “conciliatory words will have to be matched by actions that are transparent and verifiable.”

He warned a splintered al-Qaeda still poses threat to peace and security.

Prime Minister Nawaz Sharif is among over 130 world leaders attending the annual gathering.

Referring to the transfer of detainees to other countries and trial of terrorists in courts of law, he said the US is “working diligently to close the prison at Guantanamo Bay.”

Obama also announced that the US would pledge an additional $340 million in humanitarian aid to help refugees from the civil war in Syria.

“The time is now ripe for the entire international community to get behind the pursuit of peace,” he said. “Already, Israeli and Palestinian leaders have demonstrated a willingness to take significant political risks.”

Much of Obama’s focus was on when the US would use its power in the Middle East. Acknowledging that his reversal on Syria had prompted uneasiness in the region about American resolve, Obama insisted that the US would still act to protect its interests and, in some cases, to avert humanitarian tragedies.

“The US is prepared to use all elements of our power, including military force, to secure these core interests in the region,” he said. “We will confront external aggression against our allies and partners, as we did in the Gulf War.”

Obama also sent a warning to Egypt’s military-backed government that it would lose American support if it continued to crack down on dissident elements there.

As Obama spoke, the United Nations was crackling with speculation that he might shake hands with President Hassan Rouhani of Iran, who was scheduled to address the General Assembly later on Tuesday. There is no formal meeting with Rouhani on his schedule, but White House officials have said they are open to engagement “at a variety of levels.”

Rouhani was not in the General Assembly hall for Obama’s speech, though Iran’s foreign minister, Mohammad Javad Zarif, was.