The global climate community gathering now in Marrakech, Morocco is reeling from the news that the U.S. has elected Donald Trump, a climate denier, to be the next U.S. president.

The outcome was an unwelcome surprise and bitter disappointment to many climate negotiators, experts and activists at the 22nd session of the Conference of the Parties (COP 22). The latest round of United Nations climate talks aimed to quickly turn the goals of last year's Paris agreement into action and was counting on America, the second-largest greenhouse gas emitter, to not only meet its climate goals but also take greater action in the coming years.

"People are upset," said Timmons Roberts, an environmental studies professor at Brown University. "But I think there is the feeling that we've been through this before with the election in 2000," when Democrat Al Gore, a climate advocate, lost to Republican George W. Bush, who went on to withdraw the U.S. from the 1997 climate accord, the Kyoto Protocol.

On the campaign trail, Trump, a Republican, backed more fossil fuel production in the U.S. and vowed to "cancel" the Paris agreement. He has repeatedly suggested that climate change is a hoax. His Democratic challenger Hillary Clinton, in contrast, has called for urgent action on climate change. Despite Trump's record on the issue, some in Marrakech are expressing cautious optimism that he could change his tune when he's in office.

"President-elect Donald Trump has been the source of a lot of bluster on climate change over the last year," Hilda Heine, president of the Marshall Islands, told Climate Nexus. "But now that the election campaign has passed and the realities of leadership settle in, I expect he will realize that climate change is a threat to his people and to whole countries which share seas with the U.S. including my own."

"I think you have to offer the possibility that there's a difference between a first-time politician campaigning ... and actually making the transition to organizing an administration and governing," Alden Meyer, director of strategy and policy at the science advocacy group Union of Concerned Scientists, told InsideClimate News.

But, he added, "we have to admit the caveat: We really don't know if Donald Trump can make that transition on any front—not just on climate but across the board."

Several of the top current and former United Nations climate officials, however, have so far only offered generic responses to the election results. Patricia Espinosa, executive secretary of the United Nations Framework Convention on Climate Change, told Climate Home: "We look forward to engaging with his administration to take the climate action agenda forward for the benefit of the peoples of the globe."

COP22 president Salaheddine Mezouar also congratulated Trump in a statement, adding, "Now that the Paris Agreement has entered into force, all countries, along with subnational governments and non-state actors, have the shared responsibility to continue the great progress achieved to date.

"The climate change question transcends politics and concerns the preservation of our livelihood, dignity and the only planet on which we all live. We are convinced that all Parties will respect their commitments and stay the course in this collective effort."

The U.S. State Department told InsideClimate News that no officials in Marrakech would immediately comment on the election.

The election results come at a time of historic global momentum on climate action. To date, 103 countries have ratified the Paris accord, including the United States. And last month, nearly 200 countries agreed to phase down the use of potent greenhouse gases used in refrigeration and cooling. The aviation industry also committed to reducing its carbon footprint.

Aware of the significance of the U.S. elections on climate efforts, many conference attendees stayed up all night in Morocco to watch the results. "I stayed up until 4 a.m. when it became clear that even if Hillary won all the states on the West coast, Trump would win," Cara Augustenborg, chair of Friends of the Earth Ireland, wrote in a Twitter message to InsideClimate News.

While there appears to be little question that this election outcome will impact the negotiations in Marrakech, which opened on Monday and run through Nov. 18, it's too early to say how.

"We know that yesterday's elections are undoubtedly going to affect the tone of the negotiations," said Mariana Panuncio-Feldman from the environmental group World Wildlife Fund. "But we know that the task we have in front of us remains the same—that we must continue to keep our aim and our focus on the long-term vision that countries set for themselves in the Paris agreement."

In the past, Trump has both said he would cancel the Paris agreement and pull America out of the agreement. Climate experts have already clarified that Trump cannot cancel the accord, which entered into force on Nov. 4, and that there's a three-year window before any country can pull out of the agreement, followed by another one-year notice period. This means the earliest the U.S. could leave the Paris agreement is 2020.

The bigger concerns, climate researchers, strategists and activists say, is if Trump prevents the U.S. from meeting its target of reducing its greenhouse gas emissions or keeps the country from taking more ambitious climate action. The U.S. has promised to reduce emissions 26-28 percent by 2025 compared to 2005 levels, a goal many say may be within reach simply based on the market forces already pushing out older coal plants in favor of natural gas. But scientists agree that the U.S. and all big emitters must do more to keep global warming under the 2 degrees Celsius goal.

Trump could run into a lot of pushback from America's key climate allies such as China. "In the context of the U.S.-China relationship, it is important to realize that climate change over the past few years has been elevated to not only an environmental issue but a geopolitical issue," Li Shuo, a policy advisor at Greenpeace Asia, said at a press conference in Marrakech. If the U.S. backslides on its Paris agreement targets and its climate agreement with China, Shuo warns of "potential political consequences."

Regardless of Trump's impact on America's climate efforts, many in Marrakech are underscoring the need to keep fighting for urgent, responsible climate action in the United States and globally.

"It's clear that Donald Trump is about to be one of the most powerful people in the world, in 90 days or so when he is inaugurated, but even he does not have the power to amend and change the laws of physics, to stop the impacts of climate change," said Meyer.

"Our climate change movement will...triumph despite being viciously undermined and labeled a hoax," Katherine Egland of the National Association for the Advancement of Colored People, said in Marrakech.