How did a man who took office espousing a new era of engagement with the world end up a spectator to this century’s greatest humanitarian catastrophe?

Barack Obama was not against using force to protect civilians. Yet he resisted, to the end, a military intervention to stem Syria’s six-year civil war, even as it killed or displaced half the country’s population, brutally documented in real time on social media.

Part of the answer to this vexing question has been clear from the beginning. President Obama was elected to end America’s wars in Iraq and Afghanistan by a people tired of paying the cost in blood and treasure. He was extremely reluctant to get sucked into another messy Middle East conflict.

But when the siege and bombardment of cities like Aleppo placed the violence on the genocidal scale of atrocities set by Rwanda and Srebrenica, inaction by the US and its allies mocked the international community’s vows of “never again”.

Despite the pressing moral imperative, Obama remained convinced a military intervention would be a costly failure.

He believed there was no way the US could help win the war and keep the peace without a commitment of tens of thousands of troops. The battlefield was too complex: fragmented into dozens of armed groups and supported by competing regional and international powers.

“It was going to be impossible to do this on the cheap,” he said in his final press conference of 2016.

But that was not the conclusion of some senior military and cabinet officials, nor did they even propose a mass ground deployment, according to former defence secretary Chuck Hagel.

They argued that a more limited engagement could have effectively tilted the balance of power against President Bashar al-Assad. Among the options: arming the rebels and setting up a safe zone from where they could operate early in the conflict, or military strikes on the Syrian air force to push Assad to the negotiating table.

Instead, the Obama administration focused on providing humanitarian aid, and on promoting a ceasefire and political negotiations aimed at Assad’s departure.

“There is no military solution” became the mantra in briefing rooms at the White House and state department, but spokespeople were unable to explain how a political solution was possible without military leverage.

“If there is to be any hope of a political settlement, a certain military and security context is required,” former CIA Director David Petraeus told a Senate committee last year. “We and our partners need to facilitate it, and…have not done so.”

Obama’s caution was reinforced by lack of support for military intervention from key allies such as the UK and Germany. That influenced his decision to back away from his famous “red line” threat of force in response to Assad’s use of chemical weapons.

It was also part of a larger pessimism about what the US could achieve in the Middle East, sealed by a Nato intervention in Libya that was carefully planned but still left the country in a mess.

“The liberal interventionists seem to have forgotten that it is no longer the 1990s,” wrote two of Obama’s former national security officials, Steven Simon and Jonathan Stevenson, in October last year. “Disastrous forays in Iraq and Libya have undermined any American willingness to put values before interests.”

Indeed, to fully understand President Obama’s reticence, it is important to also understand that despite his liberal instincts and his soaring rhetoric about a more peaceful global order, he was a foreign policy realist with a keen sense of the limits to American power.

Although he campaigned to restore US moral authority after the disaster of the Iraq War, he rejected what he saw as the moralising interventionism of the president he replaced, George W Bush.

Instead, his emphasis was on measured diplomacy and progressive multilateralism.

That included a willingness to engage with repressive regimes, rather than consign them to an “Axis of Evil” – giving them “the choice of an open door“, he told the Nobel Peace Committee when accepting its prize at the end of his first year in office.