President Barack Obama stuck to the anticipated script in his UN General Assembly address, focusing on diplomatic openings in the Middle East. He outlined U.S. hopes to:

disarm Syria of its chemical weapons and end that country’s civil war;

resolve the longstanding nuclear impasse with Iran and;

advance final status talks between Israelis and Palestinians.

He conceded that each was a high-stakes wager. But he committed his administration to go for the trifecta, despite considerable odds.

The President used this high-profile occasion to offer his most detailed comments to date on the recent exchange of peace feelers between the United States and Iran. While reminding the world that Iran was in violation of non-proliferation agreements and had brought ostracism on itself by its aggressive designs and export of terrorism, Obama’s line was in other important respects conciliatory. He acknowledged the “deep roots” of mutual mistrust, obliquely referencing the U.S. role in overthrowing the Mossadegh government during the 1950s, and allowed that this “difficult history” would not be “overcome overnight.”

More positively, he described his exchange of letters with Iranian President Hassan Rouhani, and Iran’s repeated assurances that it will never develop a nuclear weapon, as “the basis for a meaningful agreement.” He announced that he had directed Secretary of State John Kerry “to pursue this effort with the Iranian government,” in close cooperation with European allies, as well as Russia and China.

As noteworthy as Obama’s subject matter was his pragmatic tone and his recognition of the inherent limits of U.S. power. To be sure, the president’s ultimate vision for world order remains liberal and internationalist. “These are extraordinary times, with extraordinary opportunities,” he declared. And he outlined a hopeful future in which all countries governed democratically, traded peacefully, and settled their disputes pacifically.

But by his fifth year on the job, Obama is no starry-eyed idealist. Indeed, his comments betrayed the weariness of a statesman acutely aware that although forces and events may be nudged incrementally in a positive direction, there is no making the world anew. “The United States has a hard-earned humility when it comes to our ability to determine events inside other countries,” he observed. The lessons of Iraq had guided his own administration’s policies towards Egypt, he suggested.

The U.S. government had avoided choosing sides between the Morsi government and its political opponents, and between the succeeding military government and the Muslim Brotherhood, because it recognized that the fundamental decisions about that country’s future would be made by Egyptians themselves. What the United States would continue to insist on, he said, was movement toward an inclusive, democratic government “that legitimately reflects the will of the Egyptian people.”

The president also spoke wistfully of the inevitable criticism lobbed America’s way. Given its immense power, the United States was alternately criticized in the Middle East either for adopting a “hands off” policy or for throwing its weight around. Such critiques bore bitter fruit at home and abroad, he noted—making U.S. citizens wonder why they should bother with the troubles of far-off lands, and letting demagogues in the Middle East blame the United States for their own failings as leaders. The United States has no desire to be an empire, Obama declared, but nor could it afford retreat and detachment, as some Americans counsel. Borrowing a line from his own domestic critics (and one sure to annoy Vladimir Putin), the president declared that indeed, “America is exceptional,” in part because it had repeatedly shown a willingness “to stand up not only for our own narrow self-interest, but for the interests of all.”

It was often difficult, Obama acknowledged, to translate universal ideals into practical foreign policy. To preserve its “core interests,” the United States would sometimes need to engage unsavory regimes—like the military junta ruling Egypt—that “do not meet the highest international expectations,” particularly when it comes to human rights. So doing, the United States would inevitably “be accused of hypocrisy or inconsistency.” But such is the nature of international politics.

“We live in a world of imperfect choices,” the president declared, in the line that summarizes his speech more than any other.

As a case in point, Obama’s audience could look no further than his diplomatic overtures to an Iranian regime that continues to abuse the rights of its citizens and crush dissent. In a phrase guaranteed to disappoint neo-conservative critics at home, the president assured the Iranians, “We are not seeking regime change, and we respect the right of the Iranian people to access to peaceful nuclear energy.” The implicit message in Obama’s mollifying tone: Sometimes, you need to cut deals with tyrants.

The tensions between prudence and idealism are starkest when it comes to responding to crimes against humanity. “How do we address the choice of standing callously by while children are subjected to nerve gas, or embroiling ourselves in someone else’s civil war?” he asked.

The international system continues to be organized on the principle of national sovereignty, the president noted, and independent nations will often disagree on the need for action. The world cannot “remedy every evil," he said, but neither should it accept “the cold logic of mass graves.”

How to square this circle—how to narrow the gap between the world as it is and the world as we would have it be—is the essence of twenty-first century statecraft. It will demand leaders with soft hearts and hard heads, rather than the reverse.