On an unseasonably mild December day in Washington, President Obama had reason to bask in the sun.

Across the Atlantic, international climate negotiators completed an agreement that owed much of its success to the willingness of the U.S. president to take on both congressional Republicans and fossil-fuel-industry executives on an issue that consistently ranks among the lowest priorities for American voters.

Although the international agreement reached in Paris on Saturday still leaves the world perilously vulnerable to global warming and rising seas, Obama has significantly advanced the global climate agenda and has established a mechanism that would enable countries to exploit new technology to cut greenhouse-gas emissions and, if possible, tighten existing pledges to reduce those emissions. As negotiators huddled in Paris this past week, Obama was weighing in by phone with the leaders of France, Brazil, China and India.

“This agreement represents the best chance we’ve had to save the one planet we’ve got,” Obama said Saturday at the White House after spending the early afternoon playing golf with World Bank President Jim Yong Kim. “Together we’ve shown what’s possible when the world stands as one.”

Obama said the accord would send a powerful signal, channel investment into low-carbon projects and spur job creation in those areas.

Delegates from 196 nations approved a historic climate deal after 13 days of negotiating on Saturday, Dec. 12. Here's what you need to know about the accord. (Monica Akhtar/The Washington Post)

The president also said that he imagined walking with his grandchildren watching a “quiet sunset” and “knowing . . . that our work here and now gave future generations cleaner air and cleaner water and a more sustainable planet. And what can be more important than that?”

For Obama, the Paris agreement fulfills a personal as well as a political goal, one that was delayed at the beginning of his administration because of the acute economic crisis and the political capital he devoted to overhauling the health-care system. By the end of 2009, a cap-and-trade bill passed by the House had failed in the Senate, and the international Copenhagen climate summit had ended in turmoil.

“It’s been a frustration of his from the beginning, and it was particularly difficult at the height of the economic crisis. He knows that if you poll people on climate change, it’s on the bottom of the list,” said David Axelrod, who was Obama’s chief election strategist and later senior adviser. “People felt there was a tension with dealing with climate change and dealing with the economy.”

Over five years, however, Obama has turned defeat and disarray into a political victory that could become one of the most enduring legacies of his presidency.

Obama “felt a moral obligation to do something about” climate change, Axelrod said. “This is not just a cosmetic item on his list. This is core stuff for him.”

Domestically, Obama has done through regulation what he was unable to do through legislation. He used the bailout of the auto industry to extract concessions on higher fuel-efficiency standards. Later, he added trucks, and, still later, he attacked coal-power-plant emissions through the Clean Power Plan. Cheap extraction of shale gas as a replacement for coal also helped; natural gas combustion emits half the carbon dioxide as coal.

“We may end up having to do it in chunks, as opposed to some sort of comprehensive omnibus legislation,” the president said in a Rolling Stone interview in October 2010.

Those chunks were the foundation of the international agreement signed Saturday in Paris. John Podesta, a former senior White House adviser who supported an aggressive climate policy, said Obama “understood he couldn’t have a successful diplomatic outcome without having a really forward-leaning, credible program in the U.S.”

“That was his focus, to get the domestic side right,” Podesta said.

On the international front, Obama displayed some of the same political impulses that got him elected president — a mix of idealism, pragmatism and hope.

Obama the idealist tried to rally world leaders to do as much as possible with the means available for the sake of posterity.

He pushed China and India to control hydrofluorocarbons, potent greenhouse gases from material used in refrigeration and air conditioning.

Obama the pragmatist discarded the idea of a grand bargain with top-down, uniform cuts in greenhouse-gas emissions. Instead, he embraced an approach that relies on a series of individual pledges from countries to do as much as possible within their constraints.

Obama believed that an early public pledge from China, which was afflicted with air thick with conventional pollutants, would help bring other developing countries on board. “Throughout 2014, we viewed getting the Chinese to be ambitious and active players as critical to a positive outcome in Paris,” said Podesta, who is now chairman of Hillary Clinton’s presidential campaign. Obama played a personal role, too. “It was really the president’s personal energy and commitment,” Podesta added, “and that made the difference.”

When it came to the U.S. pledge, however, Obama made no effort to introduce a carbon tax, which he favors but says would never win support in the current Congress. And his promises of financial assistance to poor developing nations to adapt to climate change have been modest, and even those could fail to win congressional approval.

Obama the realist knows that even if all the commitments are met, they will still fall short of what’s needed to stem climate damage to the planet.

So, Obama the hopeful has encouraged and applauded the efforts of Microsoft co-founder Bill Gates and more than two dozen other wealthy investors seeking to fund a search for an innovation that would make up for the shortcomings of the other efforts.

“Now, Bill has pointed out, and he’s absolutely right, that we’re also going to have to just invent some entirely new technologies,” Obama said in Paris at an event with Gates, French President François Hollande and Indian Prime Minister Narendra Modi. “I mean, the truth is, if we adapt existing technologies and make them cheaper and faster and more readily available, if we improve energy efficiency, we’re still only going to get part of the way there, and there’s still going to be a big gap to fill.”

Many environmental groups and climate experts would call that wishful thinking or a magic asterisk to fill in the gap between Paris commitments and aspirations. But it has put Obama firmly in two distinct climate action camps: one that believes that enough action can be taken now using available technology to meet the target temperature and one that believes that only technological innovation will prevent climate disaster.

Ted Nordhaus, co-founder of the Breakthrough Institute and advocate of an Apollo Project-type effort to cultivate new technologies, welcomed “the recognition that we do not, in fact, have all the technology we need to achieve deep reductions in emissions.”

Nordhaus said: “No large economy in the world has yet succeeded in making a big dent in emissions with renewables. Present-day nuclear has been taken off the table by most of the developed world and is growing too slowly in places like China to really move the needle.”

And Obama, for all the progress he helped wrangle from world leaders, seems to agree. “We don’t yet know exactly what’s going to work best,” he said. “But we know that if we put our best minds behind it and we have the dollars behind it, we’ll discover what works. We always have in the past, and we will this time as well.”