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.
The Iran deal was forged in marathon negotiations in 2014 and 2015. Kerry formed close relationships with his Russian and Iranian counterparts in European hotel salons and government palaces, and engaged in a diplomatic dance of cajolement and brinkmanship.
Signed by six world powers and Iran, and endorsed by the United Nations Security Council, the accord required Iran to disable its plutonium-producing heavy-water reactor, dismantle most of its centrifuges and get rid of most of its enriched uranium.
U.N. monitors report that Iran is largely in compliance with the deal, which was implemented in January 2016. In exchange, U.N. and most other international sanctions that had crippled the Islamic Republic's economy were lifted, and millions of dollars in frozen Iranian assets were returned.
Kerry insists the deal has made the world safer. Whether it survives intact is another question: Donald Trump has variously vowed to junk or renegotiate the deal after he enters the White House next month.
Trump also has pledged opposition to the Paris Agreement on climate change, another diplomatic priority for the Obama administration.
The world's first comprehensive climate agreement set nation-by-nation goals for emissions of greenhouse gases and created a fund to help poorer nations comply. The goal is to limit overall global warming to no more than 2 degrees Celsius above pre-industrial levels.
Enough countries signed and ratified the Paris accord this year that it went into force on Nov. 4. The breakthrough was getting India and China, among the biggest polluters, to come aboard.
Kerry says he is undaunted by the challenges he has faced.
"I'm a believer in diplomacy; that's the job I do," Kerry told reporters during a recent trip to Colombia for the signing of a peace accord ending the hemisphere's longest civil war. "And there are plenty of people around who could start conflicts. I try to prevent them or end them."
Asked about his frustrations, Kerry cited President Reagan's sitting down with Mikhail Gorbachev, then the leader of the Soviet Union, and President Nixon's going to Communist China after decades of hostility, as examples of attempting what might seem like quixotic forays into diplomacy.
But both produced positive results. Reagan and Gorbachev eventually concluded a deal to reduce intermediate-range nuclear weapons and opened talks that led to the Strategic Arms Reduction Treaty. Nixon's historic visit to China in 1972 was the start of China's opening to the world and its emergence as an economic power.
"It was improbable as hell until they sat down," Kerry said.
"You don't find out what's possible if you don't talk," he added, explaining his pursuit of seemingly impossible goals.
"You don't have to say, 'Yes,' particularly to something stupid or unacceptable," he said. "Nobody requires you to do that in a conversation. But if you don't listen and you don't have the conversation in the first place, a lot of people may die or things may get worse."
Kerry's talents proved futile in another priority: trying to jump-start the stalled Mideast peace process. Kerry had hoped bringing peace to Israel and the Palestinian territories would be his signature foreign policy achievement.
In early 2013, Kerry engaged in relentless shuttle diplomacy to the Middle East to meet separately with Israeli and Palestinian officials, attempting to coax them back into negotiations. By late summer, he had revived direct Israeli-Palestinian talks for the first time in five years.
"This is not mission impossible," he said at the time.
But the talks soon broke down. The Israelis were angry over what they called Palestinian incitements to violence, and the Palestinians were angry over continued construction of Jewish settlements in the West Bank and East Jerusalem, land claimed by the Palestinians.
Despite several attempts, Kerry never could restart the peace process. Israel's refusal to curtail what the White House called "corrosive" settlement expansion ultimately led to a U.N. Security Council condemnation on Dec. 23, in which the U.S. took the rare step of abstaining and permitting the resolution to go through.
But Syria proved the greatest calamity on Kerry's watch.
His inability, despite repeated efforts, to craft a lasting cease-fire or to start peace talks grew increasingly painful against the daily tragedy of bloodied children and dead families in the wreckage of another Russian or Syrian air raid.
President Obama was reluctant to enter the multisided conflict beyond attacking Islamic State. Russian President Vladimir Putin saw an opening and entered the war in 2015 to support Assad, a bet that now seems certain to boost Russian influence in the region.
A day after the Syria meeting in Moscow this month, the Kremlin added salt to the American wound. Spokesman Dmitry Peskov said, "Almost every level of dialogue with the United States is frozen.
"We don't communicate with one another, or we do so minimally," Peskov said in Moscow, once again belittling Kerry's efforts.
In Washington, John Kirby, the State Department spokesman, sought to downplay the fact that Kerry was not invited. "The secretary doesn't see this as a snub at all," Kirby said.
Kerry privately complained that Obama would not allow greater U.S. military support for rebels fighting the Assad government.
In 2013, he had all but applauded when it appeared Obama was going to order air strikes to punish Assad's forces for crossing a "red line" by using chemical weapons — and then was surprised when Obama pulled back. Syria ultimately surrendered the toxic agents and production materials for destruction at sea.
Over the last 15 months, Kerry watched helplessly as Moscow took a direct military role in Syria, bombarded the historic city of Aleppo and U.S.-backed rebel groups, and cemented the resurgence of Putin's Russia as a rising power.
"Where's the congressional vote to go do something?" Kerry asked in his conversation with journalists.
"It would be diplomatic malpractice not to try to pursue ... reducing the violence. And what's the alternative? ... The place is being utterly destroyed," he added.
"That's not delusional; that's a fact."
That was in September. By December, Aleppo had fallen to Assad and the Russians. And Kerry was stuck on the sidelines.
For more on international affairs, follow @TracyKWilkinson on Twitter