CASABLANCA, MOROCCO ― Hundreds of financial leaders gathered here last week to discuss one of the biggest challenges in the fight against climate change: How do we pay for it?

That answer, it would seem, isn’t terribly complex, at least in theory: invest less money in fossil fuels and more in green technology, before it’s too late.

That was the consensus among the government officials and leaders of private businesses who met last Friday for the second annual Climate Finance Day, an investment conference centered around climate change solutions. But making that shift in investment is far more complicated in practice, as the world struggles to wean itself from the easily obtained energy sources that have garnered billions in profits in the industrial age.

The timing of the finance meeting, hosted by Casablanca Finance City, was particularly notable, coming the same day the landmark Paris climate agreement took effect, the most comprehensive international plan to address climate change that world leaders have ever reached. Now, negotiators are about to meet again in Marrakech for the 22nd Conference of the Parties, where over the next two weeks they will hash out a strategy to meet those goals.

But the fight will be long, and it will be expensive.

Addressing climate change is expected to cost the world tens of billions of dollars annually through 2020, in the form of efforts to curb emissions and adaptations to changes that are already underway. A recent report from the Global Commission on the Economy and Climate estimates that local and national governments and large banks will need to invest up to $90 trillion by 2050 to keep the planet from warming more than 2 degrees Celsius, the level at which scientists say the worst effects of climate change take hold.

But despite their eye-popping size, these numbers are possible, according to financial experts. Here’s how.

Credit: Andrew Yates / Reuters An offshore wind farm in Redcar, northeast England, on Jan. 11, 2015.

Invest Now

The price of renewable energy has fallen considerably in recent years, enough that “low-carbon technology is becoming more than competitive with fossil fuels,” said Mark Lewis, a managing director at Barclays, the United Kingdom-based bank.

While the $90 trillion figure is gargantuan ― “more than has ever been invested in infrastructure in the whole history of the world,” according to James Close, director of the World Bank’s climate change group ― the money is there. It’s just that much of it is still allocated to developing fossil fuels.

Large financial institutions need to divest their portfolios from investments in oil and coal, Lewis said, and embrace renewables to build climate-positive momentum.

“Clean energy now, in many situations, is cost competitive, if not the cheaper solution,” added Anthony Hobley, CEO of the Carbon Tracker Initiative. “It’s no longer a case of ‘nice to have.’ It’s the financially obvious choice.”

Tax Carbon

One of the best ways to speed that transition is a carbon tax, which would require governments and companies to pay a fee for emitting greenhouse gases. It may be the most controversial climate policy, and recent moves to institute such fees have prompted protests in places like Canada. Most notably, Australia implemented a carbon pricing scheme in 2011 and then rolled it back three years later, citing a slowdown in economic growth.

But carbon taxes are “absolutely key” to discouraging investment in fossil fuels, said Gerard Mestrallet, chairman of Paris Europlace, a French financial think tank. Such a strategy would quantify climate risks, as each ton of carbon emissions would come at a hefty price. It would also undercut profits for big polluters and push investment toward low- and no-carbon alternatives like solar and wind.

“We must put a value on the climate risk associated with greenhouse gas emissions,” Mestrallet said.

Wolfgang Rattay / Reuters Steam from cooling towers of the coal power plant of RWE, one of Europe's biggest electricity and gas companies in Niederaussem, Germany, March 3, 2016.

Develop Sustainably

Cities across Africa and Southeast Asia are expected to boom in the coming decades, and will need to meet the basic energy needs of the estimated 1.2 billion people who still live without electricity.

“The gentleman who doesn’t have light really doesn’t care where his electricity comes from,” said Chinelo Anohu-Amazu, director general for Nigeria’s national pension commission. It’s up to governments to make sure that energy is provided sustainably, she said, and renewables should be seen as the first choice rather than a novel idea.

Through sustainable development, clean energy can “become a lifestyle, not an event,” she said.

Don’t Expect A Fairytale Ending

While large governments, including from the U.S. and China, have taken important steps in recent months, the burden to act can’t rest on one nation’s shoulders, said Carbon Tracker Initiative’s Hobley. Cooperation is key.

“We can’t assume some fairytale government is going to legislate us on a fairytale pathway,” he said, urging business leaders to act. “We have a mission, all of us now, get out and communicate to the financial markets, the decisions made now can destroy [investment] value or they can create it.”

The Paris Agreement, while historic, is voluntary; nations that don’t follow through on their pledges face no legal repercussions.

A recent report from the United Nations found that, even if all current pledges are fully implemented, the predicted emissions through the year 2030 would be on track to warm the world between 2.9 and 3.4 degrees Celsius by the end of this century ― far above the threshold of dangerous warming. And to avoid that, the UN Environment Programme has said that nations need to deepen their emissions cut pledges another 25 percent.

Sean Kidney, CEO of the Climate Bonds Initiative, a nonprofit focused on transitioning investments to green technology, stressed that timing is key. Investors who don’t act now will be left behind.

“It’s time to run, not walk,” he said.