Berber-style tents in the Blue Zone at COP22 in Marrakech, Morocco, on November 17th, 2016. (Photo: Ted Scheinman/Pacific Standard)

On Wednesday I found myself at a party in a villa outside Marrakech, speaking with a delegate from Tonga. We were by the swimming pool, where a flotilla of balloons made stately passage across the water, and the gentleman from Tonga was trying to explain how his countrymen preserve their optimism during climate talks, or at all. “Bilaterals,” he said — the answer was in partnerships between island nations, such as his, and northern ones, which are sometimes willing to lend diplomatic clout to imperiled islands. He mentioned a few smaller European governments in whom Pacific islands have found willing patrons. Then he looked me straight in the face and grinned. “In 10 years we drown,” he said. “Until then, we work.”

COP22 was billed as the “COP of action,” but in its best version of itself, it was the COP of work. This included the usual work, of course — assessing damage among the hardest-hit countries in the world; helping communities protect their farmlands while lowering emissions; tussling over carbon markets; etc. But at the first COP following the record-fast adoption of the Paris Agreement, diplomats descended on Marrakech with a set of goals that were, in some ways, more daunting by virtue of finally being concrete. The work this year in Morocco, then, included helping countries implement their climate plans according to their common but differentiated needs and capacities; creating a rulebook for the Paris Agreement; building more bilateral partnerships of the kind my friend described as so important to sinking countries; and, as of last Wednesday, bracing for diplomatic bedlam following the election of Donald Trump.

It was backbreaking, wonky, and — after Paris — deeply anticlimactic. Given the outcome of the elections in the United States, it is hard to see how it could have been otherwise. (Earlier today, Kate Wheeling wrote about the final day of negotiations over adaptation finance. The short answer is a depressing one.)

Facing at least four years of diplomatic relations with Trump, foreign ministers are making provisionally friendly overtures to the president-elect. Hakima El Haité, Morocco’s minister for the environment, has been emblematic of this strategy. “We have for many months listened to the candidate Trump,” she toldPacific Standard on Sunday. “Today we have to deal with the President Trump. Those are two personalities.” Tosi Mpanu-Mpanu of the Democratic Republic of Congo (echoing many others) said the world should be patient and hope that Trump’s advisers will steer him toward a wise position on climate.

U.S. diplomats, meanwhile, spent the last week and a half quietly and soberly indicating to their counterparts across the globe that the majority of Americans believe in climate change and want to do something about it — and that, even if our next president chooses to ignore climate change, there are still millions of Americans who will organize in solidarity with other countries. U.S. Special Envoy for Climate Jonathan Pershing noted on Tuesday that Trump can’t entirely change the direction of energy markets, anyway (“Prices for renewable energy are continuing their dramatic fall”), and has stressed throughout the week that global momentum on climate action is bigger than any one country: “Heads of state can and will change, but I’m confident that we can and we will sustain this global effort.”

This kind of optimism, though, requires Americans like Pershing and Secretary of State John Kerry to downplay the role of the government in helping fix the climate crisis.

“I want to acknowledge that, since this COP started, obviously an election took place in my country,” Kerry told us on Wednesday, “and I know it has left some here and elsewhere feeling uncertain about the future.” Nonetheless, he continued, “I’m confident regardless of what policy might be chosen, because of the marketplace. … Ultimately clean energy is expected to be a trillion-dollar market, the biggest market the world has ever known. No nation will do well if it sits on the sidelines.”

That last bit is ripping stuff, and also happens to be true, but it’s disheartening to recognize the rhetorical agility required by the extraordinary shift in U.S. leadership. As a result, Kerry emerged sounding like a representative from the American Enterprise Institute, or one of the Randians at the U.S. Chamber of Commerce: Hey, no government can hope to match the elevating powers of capitalism; trust the markets, not the heads of state. It was always the case that the private sector would have to save us. But presidents also shape markets, and they control important levers of emissions — the military comes to mind — so, with a president-elect who is at best indifferent to climate science, the almighty power of the market is slender comfort indeed. As my colleague Lucia Graves remarked to me this morning: “This is hilarious and depressing coming from an administration that accomplished practically every single one of its major energy achievements through executive power.”

And the businesses themselves came too. The morning before Kerry’s big COP address, representatives from Kellogg, Mars, and other U.S. companies appeared on a panel and took part in larger demonstrations in the Blue Zone in Marrakech. The message was clear: We are with you, even if the Orange Man is not. Already, 360-plus U.S.-based businesses have written a letter to Trump, urging him not to flake on climate commitments. “Failure to build a low-carbon economy puts American prosperity at risk,” their statement said, while “the right action now will create jobs and boost U.S. competitiveness.” Again, you had Americans speaking to their new president in language he understands: not humanitarianism, but cash.

Kevin Rabinovitz, director of global sustainability at Mars, Inc., emphasized on Wednesday how important climate action is for a company like his. “We are a food business, and at the base of every food business is a farm,” he said. “And the Paris Agreement, for America, is good business.”

Besides the financial warnings, a lot of Americans at the COP said they also feared diplomatic reprisals if we end up welching on Paris. Jeffrey Sachs warned that America would “become a pariah nation” if it rescinded its support for the Paris Agreement. Even Bill O’Reilly has urged Trump not to do so.

To be as clear as possible: The election of Trump is a colossal tragedy for the Paris Agreement, which was an imperfect document in many ways but also terribly important, and so hard-won. It’s an old saw by now that the Paris Agreement was designed by Kerry and the French not merely to bypass climate deniers in Congress, but also as a quite-delicate treaty between the U.S. and China. It is increasingly clear that, as the U.S. cedes its leadership role on climate, China will be willing to step into that breach. (The Chinese have stressed that they have neither the interest nor the ability to cover the $2.5 billion that America owes to the Green Climate Fund.) Already, China has committed to redoubling cooperation with developing countries, issuing a stirring statement at the Climate Vulnerable Forum just this afternoon, and observers in Marrakech say that Beijing will be more than pleased to maintain and expand its role as superpower in charge of green infrastructure, in any country that allows them to hire their own people. If Trump thinks the Chinese are “killing us on trade” right now, just imagine what it would mean to give them a four-year head-start in the renewable energy economy.

Last year in Paris, we closed the talks with champagne. The close of Marrakech feels very different. This afternoon, on the red dirt outside the conference tents at Bab Ighli, there was the annual COP “family photo,” which included the big names but also the little ones, everyone gathering around a huge banner that read “WE WILL MOVE AHEAD.” The civil society groups raised a shout, and there were sudden hands in the air, and a crane swooped in with a quintet of photographers atop, snapping photos. There’s relief here, but it’s mainly relief after a very long, and sometimes very sad, two weeks. Most of the smiles I’ve seen today look tight and brittle: the smiles of people who have ample reason to frown, who in some cases are terrified for their lives and certainly for the lives of their children, who watched with horror as America elected a demagogue to the world’s foremost position of power, and who now must go home with a lot of unresolved questions. These are the tired smiles that are changing the world, the smiles in spite of everything—the smiles that say, “In 10 years we drown; until then, we work.”