Here is a Barack Obama puzzle: Why did the president turn 180 degrees on a key foreign policy question in a little more than two years?

The issue is whether promoting democracy and human rights should be an American priority. In his annual address to the U.N. General Assembly last month, Obama offered a clear answer: No.

Speaking specifically about the Middle East and North Africa, the president identified four core interests: defending allies from aggression, ensuring access to oil, attacking terrorist networks that threaten Americans and stopping weapons of mass destruction.

America cares about democracy, human rights and free trade, he said, but “we can rarely achieve these objectives through unilateral American action.”

Though it was unusual for a U.S. president to reject a values-based policy so explicitly, the underlying view was not unfamiliar; former president George H.W. Bush would have found it congenial.

What was striking about it, as my colleague Jackson Diehl pointed out, was how directly it repudiated a doctrine Obama had outlined in a speech at the State Department just 28 months earlier.

In that address, Obama recited a similar list of core interests, but he said those alone could no longer animate U.S. policy. Instead, he said, the United States would champion universal rights and political reform, and not as “a secondary interest.”

On the contrary: Support for democracy would be a “top priority,” Obama proclaimed, “that must be translated into concrete actions, and supported by all of the diplomatic, economic and strategic tools at our disposal.”

The president acknowledged that such a values-based policy would be difficult and would encounter setbacks.

“But after decades of accepting the world as it is in the region,” he said, “we have a chance to pursue the world as it should be.”

Two years later, Obama the idealist is gone. What happened?

Officials at the National Security Council, after promising an explanation, ended up furnishing no comment. But here’s one possible answer.

When Obama vowed a redirection of U.S. policy in May 2011, the Arab Spring was young and hopeful. Tunisia and Egypt seemed on track toward democracy. In Libya, U.S. military force had helped depose a dictator; in Syria, peaceful demonstrations against another dictator were just beginning.

“In Damascus,” Obama said, “we heard the young man who said, ‘After the first yelling, the first shout, you feel dignity.’ ”

But Bashar al-Assad responded brutally, and his opponents took up arms. Obama predicted and wished for Assad’s imminent defeat, but he resisted calls from inside and outside his administration to help bring that defeat about, not with U.S. troops but by training and supporting the rebels.

By the time of Obama’s U.N. address, generals in Egypt had toppled the elected government, and Libya was plagued by uncontrolled militias. Worst, Syria was a humanitarian and foreign-policy disaster, with well over 100,000 people killed and millions more forced from their homes. In northern Syria, al-Qaeda affiliates were establishing the kind of safe havens that the United States went to war in Afghanistan to eradicate.

This can’t be an easy thing for a president to live with, as President Clinton made clear after Rwanda. So Obama fashioned a new doctrine.

Not only was intervention in Syria not feasible, an arguable but defensible position, but the United States would never act to “prevent mass atrocities and protect human rights” unless “the international community” agreed to act in concert. Not only could the United States not impose democracy in Syria, but it would not make it a priority in Egypt, where “core interests like the Camp David Accords and counterterrorism” would take precedence, or apparently anywhere else.

In 2011, Obama portrayed himself as cleareyed about the pitfalls of democracy promotion but committed for the long haul nonetheless.

“It will not be easy,” he acknowledged. “There’s no straight line to progress, and hardship always accompanies a season of hope. But the United States of America was founded on the belief that people should govern themselves. And now we cannot hesitate to stand squarely on the side of those who are reaching for their rights . . . .”

The season of hope passed, and with it Obama’s commitment. Now, he makes clear, it is up to the United Nations to step up. And if it does not?

“If that’s the world that people want to live in, they should say so and reckon with the cold logic of mass graves,” Obama said.

On the surface, at least, he seems prepared to live with that cold logic. But Americans do not like to think of themselves as a nation that will wait for the “international community” before stepping in to help those in need or avert a mass atrocity, and I doubt Obama really likes that idea either. Syria is a hard case that has pushed him toward bad law. Maybe this won’t be his final answer.

Read more from Fred Hiatt’s archive, follow him on Twitter or subscribe to his updates on Facebook.