John F. Kerry was late to his own party. Staffers, journalists and other officials were gathered in the ornate Benjamin Franklin salon at the State Department on Dec. 14 for early Christmas festivities. But the secretary of State was nowhere to be seen.

Kerry was on the telephone to various world leaders, trying to find out about a major diplomatic meeting — from which the United States had been excluded.

The gathering, which sought to broker a resolution to the devastating Syrian conflict, took place six days later in Moscow and involved the foreign ministers of Russia, Iran and Turkey.

They engineered the evacuation of thousands of civilians from Aleppo and the fall of the besieged city to forces loyal to Syrian President Bashar Assad. The White House had called for Assad’s ouster, but his hold on power is now all but assured — thanks in large part to Russia.

The Obama administration — specifically Kerry — had led repeated efforts to craft a diplomatic solution to ease or end the bloodshed in Syria. In the end, he was left out of the first successful cease-fire for Aleppo and a major humanitarian rescue operation.

Kerry, 73, is nothing if not indefatigable, traveling to all corners of the world as America’s top diplomat over the last four years. But as he prepares to leave office, he confronts a mixed legacy, with a handful of successes coupled with searing defeats, especially in the Middle East.

His inability to halt the carnage in Syria, or to block Russia’s growing influence, ranks as the most serious blot on his record. But he also got nowhere trying to end the Israeli-Palestinian standoff, or to stop Saudi Arabia, a U.S. ally, from bombing civilians in Yemen.

Kerry’s greatest success was the historic accord to curtail Iran’s nuclear development program and a landmark climate change treaty to limit greenhouse gas emissions and slow global warming.