In his address to the U.N. General Assembly, President Barack Obama gave some coherence to his foreign policy vision, which acknowledges both America’s role in the world and its limited ability to determine events inside other nations.

He also set important, if incomplete, priorities for the rest of his term. Obama is well known for giving good speeches, so the question is whether he can implement a consistent, effective strategy to achieve his goals.

It is no surprise that Iran was at the top of his agenda. The recent election of a more moderate president, Hassan Rouhani, has improved opportunities to pursue a negotiated solution to the Iranian nuclear program, which threatens regional stability. More surprising was Obama’s decision to give prominence to Israeli-Palestinian peace efforts, which the White House initially held at arm’s length even as Secretary of State John Kerry began to bring the two sides together. We hope that means the U.S.-brokered negotiations, taking place behind closed doors, may be making some progress.

On Iran, Obama was appropriately cautious, noting that more than three decades of hostility between the United States and Iran would not be overcome easily. Even so, Obama said “the diplomatic path must be tested,” gave Kerry that task and held out the hope that a nuclear deal would be a major step toward “a different relationship — one based on mutual interests and mutual respect.”

Rouhani, in his own speech to the General Assembly, also spoke of tolerance and understanding and said nuclear weapons had no place in his country’s future. But he made no specific proposal to demonstrate that Iran was prepared to go beyond the well chosen words. Whether the two nations can actually break new ground might be seen when Iran’s foreign minister, Mohammad Javad Zarif, attends a scheduled meeting with Kerry and the other major powers negotiating the Iran dispute this week. It would be the highest level meeting between the two countries since 2007. (The White House proposed an “encounter” between Obama and Rouhani at the United Nations, but Iranians refused the overture as “too complicated” politically.)

Before the world leaders, Obama took pains to defend his threat of military action against Syria for the use of chemical weapons as crucial to getting a Russia-brokered deal on the table and the Security Council to act. He sharply called on Russia and Iran to accept reality: that the Assad regime cannot be left to stand and the continuing war would lead to an increasingly violent arena for extremists. And he insisted that America would be engaged in the Middle East for the “long haul.”

There was much to consider in his comments about how and when America will use its influence and its force in the future. He warned that the danger for the world is not that America is eager to immerse itself in other countries but that it may disengage and leave a leadership vacuum that no other nation is ready to fill.

Obama affirmed his intention to use “all elements of our power, including military force,” to secure America’s interests, like preventing Iran from gaining a nuclear weapon. But he also said that, after more than a decade of war and a conflicted record in the Middle East, America had gained a “hard-earned humility” about its ability to alter the course of other countries. The challenge for the United States is balancing those two ideas.